Skip to content

Commit f07f413

Browse files
committed
Merge branch 'jc/doc-push-satellite' into maint
* jc/doc-push-satellite: Documentation/git-push.txt: clarify the "push from satellite" workflow
2 parents fff26a6 + b48990e commit f07f413

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Documentation/git-push.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,23 @@ the ones in the examples below) can be configured as the default for
385385
A handy way to push the current branch to the same name on the
386386
remote.
387387

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

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

0 commit comments

Comments
 (0)