Re: [PATCH] Mention that 'push .. master' is in explicit form master:refs/heads/master

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jari Aalto <jari.aalto@xxxxxxxxx> writes:

> Signed-off-by: Jari Aalto <jari.aalto AT cante.net>
> ---
>  Documentation/git-push.txt |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt
> index 7b8e075..71ac450 100644
> --- a/Documentation/git-push.txt
> +++ b/Documentation/git-push.txt
> @@ -105,7 +105,9 @@ git push origin master::
>  	Find a ref that matches `master` in the source repository
>  	(most likely, it would find `refs/heads/master`), and update
>  	the same ref (e.g. `refs/heads/master`) in `origin` repository
> -	with it.
> +	with it. The following would be exactly same command:
> +
> +	git push origin master:refs/heads/master

They _might_ be exactly the same.

The reason people often explicitly write

	$ git push $URL refs/heads/master:refs/heads/master

in their insns for newbies is because this form would not be
affected by the random factors at $URL repository (or your
repository) and will consistently get the same result.

	$ git push $URL foo

may push branch head 'foo' or tag 'foo' depending on which one
you have locally.  Having both is not encouraged, but spelling
the insn out explicitly as refs/heads/foo makes it clear the
command is talking about the branch even when there is a tag
with the same name.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux