X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-push.txt;h=f06d94e318d6d0bf918430bafc746e96a2abe7a1;hb=4b172de81b878cdc8b10803fd0cd79b3ca66a621;hp=3128170bcd1c3e3eb5981ed4c2f35221dfb06658;hpb=066a5268db8bff70ebd31d7887e060d1463fe57c;p=git.git diff --git a/Documentation/git-push.txt b/Documentation/git-push.txt index 3128170bc..f06d94e31 100644 --- 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. + -The 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 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 side represents the destination location. + The local ref that matches is used -to fast forward the remote ref that matches . If -the optional plus `+` is used, the remote ref is updated +to fast forward the remote ref that matches (or, if no was +specified, the same ref that 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 @@ -69,7 +70,9 @@ the remote repository. be mirrored to the remote repository. Newly created local refs will be pushed to the remote end, locally updated refs will be force updated on the remote end, and deleted refs - will be removed from the remote end. + will be removed from the remote end. This is the default + if the configuration option `remote..mirror` is + set. \--dry-run:: Do everything except actually send the updates. @@ -165,7 +168,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 - 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 @@ -179,9 +183,10 @@ git push origin master:satellite/master:: 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 ------