git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Documentation/git-push.txt: clarify the "push from satellite" workflow

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 27, 2012, 23:52 UTC
Message-ID
<7v1ufeli2s.fsf_-_@alter.siamese.dyndns.org>
In-Reply-To
<50B41DF7.2000705@nvidia.com>

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>
---
Brandon Casey <bcasey@nvidia.com> writes:
>> So refs are correct. The context is not sufficiently explained.
>
> Ah, I see.  Yeah, I think that is complex enough to merit an
> extended explanation.
Something like this?
 Documentation/git-push.txt | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
diff --git c/Documentation/git-push.txt w/Documentation/git-push.txt
index 6d19d59..8b637d3 100644
--- c/Documentation/git-push.txt
+++ w/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
Previous: Brandon Casey
Message 4 of 4 in “Documentation/git-push.txt: fix typo in remote tracking branch path”
  1. Documentation/git-push.txt: fix typo in remote tracking branch pathBrandon Casey, Nov 27, 2012
  2. Junio C HamanoNov 27, 2012
  3. Brandon CaseyNov 27, 2012
  4. Documentation/git-push.txt: clarify the "push from satellite" workflowJunio C Hamano, Nov 27, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.