summaryrefslogtreecommitdiff
path: root/Documentation/git-push.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-11-27 15:52:27 -0800
committerJunio C Hamano <gitster@pobox.com>2012-11-27 22:39:08 -0800
commitb48990e7382a94bc6762ee7b88467d5d5a70fcb0 (patch)
treeae93cc1199ebfebdff5066f55f53ba4cd6f01568 /Documentation/git-push.txt
parent86ef7b37f921dccff6d940fb17005e0906a2bf3e (diff)
downloadgit-b48990e7382a94bc6762ee7b88467d5d5a70fcb0.tar.gz
Documentation/git-push.txt: clarify the "push from satellite" workflow
The context of the example to push into refs/remotes/satellite/ hierarchy of the other repository needs to be spelled out explicitly for the value of this example to be fully appreciated. Make it so. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-push.txt')
-rw-r--r--Documentation/git-push.txt16
1 files changed, 14 insertions, 2 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index 6d19d59ce5..8b637d339f 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -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