Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Amend git-push refspec documentation
author
Sam Vilain
<sam.vilain@catalyst.net.nz>
Mon, 21 Apr 2008 03:31:24 +0000
(15:31 +1200)
committer
Junio C Hamano
<gitster@pobox.com>
Wed, 23 Apr 2008 06:01:48 +0000
(23:01 -0700)
These paragraphs are a little confusing. Also, make it clearer when
you have to specify the full name for <dst>
Signed-off-by: Sam Vilain <sam.vilain@catalyst.net.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-push.txt
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
208641c
)
diff --git
a/Documentation/git-push.txt
b/Documentation/git-push.txt
index 3128170bcd1c3e3eb5981ed4c2f35221dfb06658..05859491378243639e81c9c8ab7deffb90d83d07 100644
(file)
--- a/
Documentation/git-push.txt
+++ b/
Documentation/git-push.txt
@@
-35,14
+35,15
@@
OPTIONS
by the source ref, followed by a colon `:`, followed by
the destination ref.
+
by the source ref, followed by a colon `:`, followed by
the destination ref.
+
-The <src> side
can be an
-arbitrary "SHA1 expression" that can be used as an
-argument to `git-cat-file -t`. E.g. `master~4` (push
-
four parents before the current master head)
.
+The <src> side
represents the source branch (or arbitrary
+"SHA1 expression", such as `master~4` (four parents before the
+tip of `master` branch); see linkgit:git-rev-parse[1]) that you
+
want to push. The <dst> side represents the destination location
.
+
The local ref that matches <src> is used
+
The local ref that matches <src> is used
-to fast forward the remote ref that matches <dst>. If
-the optional plus `+` is used, the remote ref is updated
+to fast forward the remote ref that matches <dst> (or, if no <dst> was
+specified, the same ref that <src> referred to locally). If
+the optional leading plus `+` is used, the remote ref is updated
even if it does not result in a fast forward update.
+
Note: If no explicit refspec is found, (that is neither
even if it does not result in a fast forward update.
+
Note: If no explicit refspec is found, (that is neither
@@
-165,7
+166,8
@@
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
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. If `master` did not exist remotely, it would be
+ created.
git push origin :experimental::
Find a ref that matches `experimental` in the `origin` repository
git push origin :experimental::
Find a ref that matches `experimental` in the `origin` repository
@@
-179,9
+181,10
@@
git push origin master:satellite/master::
git push origin master:refs/heads/experimental::
Create the branch `experimental` in the `origin` repository
git push origin master:refs/heads/experimental::
Create the branch `experimental` in the `origin` repository
- by copying the current `master` branch. This form is usually
- needed to create a new branch in the remote repository as
- there is no `experimental` branch to match.
+ by copying the current `master` branch. This form is only
+ needed to create a new branch or tag in the remote repository when
+ the local name and the remote name are different; otherwise,
+ the ref name on its own will work.
Author
------
Author
------