]> rtime.felk.cvut.cz Git - git.git/blobdiff - Documentation/git-push.txt
Merge branch 'mg/push-repo-option-doc'
[git.git] / Documentation / git-push.txt
index ea9757692ac6fa7f58eb8a150f9eef9e30875333..e1a46a79581d62596625f9896a77538f6f42faff 100644 (file)
@@ -219,22 +219,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::