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>
Michael J Gruber committed
Jan 27, 2015 at 13:35 UTC
57b92a77a0aeff49e82cc0bfd14eac9313683766
1 file changed
+2
-16
Documentation/git-push.txt
+2
-16
@@ -207,22 +207,8 @@ origin +master` to force a push to the `master` branch). See the
207
`<refspec>...` section above for details.
208
209
--repo=<repository>::
210
- This option is only relevant if no <repository> argument is
211
- passed in the invocation. In this case, 'git push' derives the
212
- remote name from the current branch: If it tracks a remote
213
- branch, then that remote repository is pushed to. Otherwise,
214
- the name "origin" is used. For this latter case, this option
215
- can be used to override the name "origin". In other words,
216
- the difference between these two commands
217
-+
218
---------------------------
219
-git push public #1
220
-git push --repo=public #2
221
---------------------------
222
-+
223
-is that #1 always pushes to "public" whereas #2 pushes to "public"
224
-only if the current branch does not track a remote branch. This is
225
-useful if you write an alias or script around 'git push'.
210
+ This option is equivalent to the <repository> argument. If both
211
+ are specified, the command-line argument takes precedence.
212
213
-u::
214
--set-upstream::