From: Junio C Hamano Date: Wed, 6 Dec 2017 17:23:36 +0000 (-0800) Subject: Merge branch 'tz/branch-doc-remove-set-upstream' X-Git-Tag: v2.16.0-rc0~82 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0186e9ebedfb18ad02fe20af18cc35526760fbad?hp=-c Merge branch 'tz/branch-doc-remove-set-upstream' "git branch --set-upstream" has been deprecated and (sort of) removed, as "--set-upstream-to" is the preferred one these days. The documentation still had "--set-upstream" listed on its synopsys section, which has been corrected. * tz/branch-doc-remove-set-upstream: branch doc: remove --set-upstream from synopsis --- 0186e9ebedfb18ad02fe20af18cc35526760fbad diff --combined Documentation/git-branch.txt index 520c53b5e8,de90fde378..b3084c99c1 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@@ -14,11 -14,10 +14,11 @@@ SYNOPSI [(--merged | --no-merged) []] [--contains []] [--points-at ] [--format=] [...] - 'git branch' [--set-upstream | --track | --no-track] [-l] [-f] [] + 'git branch' [--track | --no-track] [-l] [-f] [] 'git branch' (--set-upstream-to= | -u ) [] 'git branch' --unset-upstream [] 'git branch' (-m | -M) [] +'git branch' (-c | -C) [] 'git branch' (-d | -D) [-r] ... 'git branch' --edit-description [] @@@ -65,10 -64,6 +65,10 @@@ If had a corresponding refl renaming. If exists, -M must be used to force the rename to happen. +The `-c` and `-C` options have the exact same semantics as `-m` and +`-M`, except instead of the branch being renamed it along with its +config and reflog will be copied to a new name. + With a `-d` or `-D` option, `` will be deleted. You may specify more than one branch for deletion. If the branch currently has a reflog then the reflog will also be deleted. @@@ -86,7 -81,7 +86,7 @@@ OPTION --delete:: Delete a branch. The branch must be fully merged in its upstream branch, or in `HEAD` if no upstream was set with - `--track` or `--set-upstream`. + `--track` or `--set-upstream-to`. -D:: Shortcut for `--delete --force`. @@@ -97,19 -92,19 +97,19 @@@ all changes made to the branch ref, enabling use of date based sha1 expressions such as "@\{yesterday}". Note that in non-bare repositories, reflogs are usually - enabled by default by the `core.logallrefupdates` config option. + enabled by default by the `core.logAllRefUpdates` config option. The negated form `--no-create-reflog` only overrides an earlier `--create-reflog`, but currently does not negate the setting of - `core.logallrefupdates`. + `core.logAllRefUpdates`. -f:: --force:: - Reset to if exists - already. Without `-f` 'git branch' refuses to change an existing branch. + Reset to , even if exists + already. Without `-f`, 'git branch' refuses to change an existing branch. In combination with `-d` (or `--delete`), allow deleting the branch irrespective of its merged status. In combination with `-m` (or `--move`), allow renaming the branch even if the new - branch name already exists. + branch name already exists, the same applies for `-c` (or `--copy`). -m:: --move:: @@@ -118,13 -113,6 +118,13 @@@ -M:: Shortcut for `--move --force`. +-c:: +--copy:: + Copy a branch and the corresponding reflog. + +-C:: + Shortcut for `--copy --force`. + --color[=]:: Color branches to highlight current, local, and remote-tracking branches. @@@ -277,16 -265,10 +277,16 @@@ start-point is either a local or remote Only list branches of the given object. --format :: - A string that interpolates `%(fieldname)` from the object - pointed at by a ref being shown. The format is the same as + A string that interpolates `%(fieldname)` from a branch ref being shown + and the object it points at. The format is the same as that of linkgit:git-for-each-ref[1]. +CONFIGURATION +------------- +`pager.branch` is only respected when listing branches, i.e., when +`--list` is used or implied. The default is to use a pager. +See linkgit:git-config[1]. + Examples --------