git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path
@ 2012-11-27  0:55 Brandon Casey
  2012-11-27  1:30 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Brandon Casey @ 2012-11-27  0:55 UTC (permalink / raw)
  To: gitster; +Cc: git, Brandon Casey, Brandon Casey

From: Brandon Casey <drafnel@gmail.com>

This example in the documentation seems to be trying to describe the likely
remote tracking branch that will be updated by a push to the "origin" remote
with the destination branch 'satellite/master', but it forgot to specify
the remote name in the path specification.

So,

   refs/remotes/satellite/master

should be spelled like

   refs/remotes/origin/satellite/master

Signed-off-by: Brandon Casey <bcasey@nvidia.com>
---
 Documentation/git-push.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
index fe46c42..a18f929 100644
--- a/Documentation/git-push.txt
+++ b/Documentation/git-push.txt
@@ -387,8 +387,8 @@ the ones in the examples below) can be configured as the default for
 `git push origin 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
-	do the same for `dev` and `satellite/dev`.
+	`refs/remotes/origin/satellite/master`) in the `origin` repository,
+	then do the same for `dev` and `satellite/dev`.
 
 `git push origin HEAD:master`::
 	Push the current branch to the remote ref matching `master` in the
-- 
1.7.8.4


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path
  2012-11-27  0:55 [PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path Brandon Casey
@ 2012-11-27  1:30 ` Junio C Hamano
  2012-11-27  1:57   ` Brandon Casey
  0 siblings, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2012-11-27  1:30 UTC (permalink / raw)
  To: Brandon Casey; +Cc: git, Brandon Casey

Brandon Casey <bcasey@nvidia.com> writes:

> From: Brandon Casey <drafnel@gmail.com>
>
> This example in the documentation seems to be trying to describe the likely
> remote tracking branch that will be updated by a push to the "origin" remote
> with the destination branch 'satellite/master', but it forgot to specify
> the remote name in the path specification.
>
> So,
>
>    refs/remotes/satellite/master
>
> should be spelled like
>
>    refs/remotes/origin/satellite/master

I might make sense to rename 'origin' to 'mothership' in that
example and explain that this is emulating 'git fetch' run on the
mothership to integrate the work done on 'satellite' using 'git
push' in the opposite direction, which 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).

If you were to run 'git fetch' on the mothership to intgrate the
work on the 'satellite', it would have a remote called 'satellite',
and would keep remote-tracking branches for the branches local to
'satellite' in the 'refs/remotes/satellite/' hierarchy.  You would
push your local 'master' to their 'refs/remotes/satellite/master',
to emulate 'git fetch' done on the mothership in the reverse
direction.

So refs are correct. The context is not sufficiently explained.

>
> Signed-off-by: Brandon Casey <bcasey@nvidia.com>
> ---
>  Documentation/git-push.txt |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index fe46c42..a18f929 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -387,8 +387,8 @@ the ones in the examples below) can be configured as the default for
>  `git push origin 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
> -	do the same for `dev` and `satellite/dev`.
> +	`refs/remotes/origin/satellite/master`) in the `origin` repository,
> +	then do the same for `dev` and `satellite/dev`.
>  
>  `git push origin HEAD:master`::
>  	Push the current branch to the remote ref matching `master` in the

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path
  2012-11-27  1:30 ` Junio C Hamano
@ 2012-11-27  1:57   ` Brandon Casey
  2012-11-27 23:52     ` [PATCH] Documentation/git-push.txt: clarify the "push from satellite" workflow Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Brandon Casey @ 2012-11-27  1:57 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git@vger.kernel.org, Brandon Casey

On 11/26/2012 5:30 PM, Junio C Hamano wrote:
> Brandon Casey <bcasey@nvidia.com> writes:
>
>> From: Brandon Casey <drafnel@gmail.com>
>>
>> This example in the documentation seems to be trying to describe the likely
>> remote tracking branch that will be updated by a push to the "origin" remote
>> with the destination branch 'satellite/master', but it forgot to specify
>> the remote name in the path specification.
>>
>> So,
>>
>>     refs/remotes/satellite/master
>>
>> should be spelled like
>>
>>     refs/remotes/origin/satellite/master
>
> I might make sense to rename 'origin' to 'mothership' in that
> example and explain that this is emulating 'git fetch' run on the
> mothership to integrate the work done on 'satellite' using 'git
> push' in the opposite direction, which 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).
>
> If you were to run 'git fetch' on the mothership to intgrate the
> work on the 'satellite', it would have a remote called 'satellite',
> and would keep remote-tracking branches for the branches local to
> 'satellite' in the 'refs/remotes/satellite/' hierarchy.  You would
> push your local 'master' to their 'refs/remotes/satellite/master',
> to emulate 'git fetch' done on the mothership in the reverse
> direction.
>
> 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.

-Brandon


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Documentation/git-push.txt: clarify the "push from satellite" workflow
  2012-11-27  1:57   ` Brandon Casey
@ 2012-11-27 23:52     ` Junio C Hamano
  0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2012-11-27 23:52 UTC (permalink / raw)
  To: Brandon Casey; +Cc: git@vger.kernel.org, Brandon Casey

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-11-27 23:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-27  0:55 [PATCH] Documentation/git-push.txt: fix typo in remote tracking branch path Brandon Casey
2012-11-27  1:30 ` Junio C Hamano
2012-11-27  1:57   ` Brandon Casey
2012-11-27 23:52     ` [PATCH] Documentation/git-push.txt: clarify the "push from satellite" workflow Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).