From: Junio C Hamano Date: Mon, 4 Aug 2014 21:03:45 +0000 (-0700) Subject: Merge branch 'tf/maint-doc-push' X-Git-Tag: v2.1.0-rc1~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/b16665e832642602b28b9abf5da3a2c53b97d6ca?ds=inline;hp=-c Merge branch 'tf/maint-doc-push' * tf/maint-doc-push: git-push: fix link in man page --- b16665e832642602b28b9abf5da3a2c53b97d6ca diff --combined Documentation/git-push.txt index 21cd455508,ae1817af7d..c0d7403b9a --- a/Documentation/git-push.txt +++ b/Documentation/git-push.txt @@@ -33,7 -33,7 +33,7 @@@ When the command line does not specify arguments or `--all`, `--mirror`, `--tags` options, the command finds the default `` by consulting `remote.*.push` configuration, and if it is not found, honors `push.default` configuration to decide - what to push (See gitlink:git-config[1] for the meaning of `push.default`). + what to push (See linkgit:git-config[1] for the meaning of `push.default`). OPTIONS[[OPTIONS]] @@@ -56,13 -56,8 +56,13 @@@ it can be any arbitrary "SHA-1 expressi + The 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 `:` is omitted, the same ref as will be -updated. +be named. +If `git push []` without any `` argument is set to +update some ref at the destination with `` with +`remote..push` configuration variable, `:` part can +be omitted---such a push will update a ref that `` normally updates +without any `` on the command line. Otherwise, missing +`:` means to update the same ref as the ``. + The object referenced by is used to update the reference on the remote side. By default this is only allowed if is not @@@ -83,8 -78,8 +83,8 @@@ the local side, the remote side is upda already exists on the remote side. --all:: - Instead of naming each ref to push, specifies that all - refs under `refs/heads/` be pushed. + Push all branches (i.e. refs under `refs/heads/`); cannot be + used with other . --prune:: Remove remote branches that don't have a local counterpart. For example @@@ -385,7 -380,7 +385,7 @@@ will now start building on top of B The command by default does not allow an update that is not a fast-forward to prevent such loss of history. -If you do not want to lose your work (history from X to B) nor the work by +If you do not want to lose your work (history from X to B) or the work by the other person (history from X to A), you would need to first fetch the history from the repository, create a history that contains changes done by both parties, and push the result back. @@@ -442,10 -437,8 +442,10 @@@ Example configured for the current branch). `git push origin`:: - Without additional configuration, works like - `git push origin :`. + Without additional configuration, pushes the current branch to + the configured upstream (`remote.origin.merge` configuration + variable) if it has the same name as the current branch, and + errors out without pushing otherwise. + The default behavior of this command when no is given can be configured by setting the `push` option of the remote, or the `push.default`