diff options
author | Michael J Gruber <git@drmicha.warpmail.net> | 2015-01-27 13:35:53 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-01-28 12:56:06 -0800 |
commit | 57b92a77a0aeff49e82cc0bfd14eac9313683766 (patch) | |
tree | d734438de5c09df6a93ce9fac214e60d56ab2576 /Documentation | |
parent | Merge branch 'maint-1.9' into maint-2.0 (diff) | |
download | tgif-57b92a77a0aeff49e82cc0bfd14eac9313683766.tar.xz |
git-push.txt: document the behavior of --repo
As per the code, the --repo <repo> option is equivalent to the
<repo> argument to 'git push', but somehow it was documented as
something that is more than that. [It exists for historical
reasons, back from the time when options had to come before
arguments.]
Say so. [But not that.]
Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-push.txt | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 21cd455508..aea848a782 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -207,22 +207,8 @@ origin +master` to force a push to the `master` branch). See the `<refspec>...` section above for details. --repo=<repository>:: - This option is only relevant if no <repository> argument is - passed in the invocation. In this case, 'git push' derives the - remote name from the current branch: If it tracks a remote - branch, then that remote repository is pushed to. Otherwise, - the name "origin" is used. For this latter case, this option - can be used to override the name "origin". In other words, - the difference between these two commands -+ --------------------------- -git push public #1 -git push --repo=public #2 --------------------------- -+ -is that #1 always pushes to "public" whereas #2 pushes to "public" -only if the current branch does not track a remote branch. This is -useful if you write an alias or script around 'git push'. + This option is equivalent to the <repository> argument. If both + are specified, the command-line argument takes precedence. -u:: --set-upstream:: |