Skip to content

Commit

Permalink
Merge branch 'jc/doc-push-satellite'
Browse files Browse the repository at this point in the history
* jc/doc-push-satellite:
  Documentation/git-push.txt: clarify the "push from satellite" workflow
  • Loading branch information
Junio C Hamano committed Nov 29, 2012
2 parents 90583f1 + b48990e commit 7472ad1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Documentation/git-push.txt
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,23 @@ the ones in the examples below) can be configured as the default for
A handy way to push the current branch to the same name on the
remote.

`git push origin master:satellite/master dev:satellite/dev`::
`git push mothership master:satellite/master dev:satellite/dev`::
Use the source ref that matches `master` (e.g. `refs/heads/master`)
to update the ref that matches `satellite/master` (most probably
`refs/remotes/satellite/master`) in the `origin` repository, then
`refs/remotes/satellite/master`) in the `mothership` repository;
do the same for `dev` and `satellite/dev`.
+
This is to emulate `git fetch` run on the `mothership` using `git
push` that is run in the opposite direction in order to integrate
the work done on `satellite`, and is often necessary when you can
only make connection in one way (i.e. satellite can ssh into
mothership but mothership cannot initiate connection to satellite
because the latter is behind a firewall or does not run sshd).
+
After running this `git push` on the `satellite` machine, you would
ssh into the `mothership` and run `git merge` there to complete the
emulation of `git pull` that were run on `mothership` to pull changes
made on `satellite`.

`git push origin HEAD:master`::
Push the current branch to the remote ref matching `master` in the
Expand Down

0 comments on commit 7472ad1

Please sign in to comment.