diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-12-27 14:57:50 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-12-27 14:57:50 -0800 |
commit | 7cdebd8a2039cb3ec717b880709ea6dfd824e3c4 (patch) | |
tree | f07fff24eb335bc59849625af60378a869f766a8 /Documentation | |
parent | 7794a680e63a2a11b73cb1194653662f2769a792 (diff) | |
parent | fc9261ca611080b1dae76b86b3bf5f36d592042f (diff) | |
download | git-7cdebd8a2039cb3ec717b880709ea6dfd824e3c4.tar.gz |
Merge branch 'jc/push-refmap'
Make "git push origin master" update the same ref that would be
updated by our 'master' when "git push origin" (no refspecs) is run
while the 'master' branch is checked out, which makes "git push"
more symmetric to "git fetch" and more usable for the triangular
workflow.
* jc/push-refmap:
push: also use "upstream" mapping when pushing a single ref
push: use remote.$name.push as a refmap
builtin/push.c: use strbuf instead of manual allocation
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-push.txt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 9eec740910..2b7f4f939f 100644 --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@ -56,8 +56,13 @@ it can be any arbitrary "SHA-1 expression", such as `master~4` or + The <dst> tells which ref on the remote side is updated with this push. Arbitrary expressions cannot be used here, an actual ref must -be named. If `:`<dst> is omitted, the same ref as <src> will be -updated. +be named. +If `git push [<repository>]` without any `<refspec>` argument is set to +update some ref at the destination with `<src>` with +`remote.<repository>.push` configuration variable, `:<dst>` part can +be omitted---such a push will update a ref that `<src>` normally updates +without any `<refspec>` on the command line. Otherwise, missing +`:<dst>` means to update the same ref as the `<src>`. + The object referenced by <src> is used to update the <dst> reference on the remote side. By default this is only allowed if <dst> is not |