From: Junio C Hamano Date: Thu, 19 Oct 2017 05:45:45 +0000 (+0900) Subject: Merge branch 'jc/branch-force-doc-readability-fix' X-Git-Tag: v2.15.0-rc2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a4ebf9e0c53d03677175a1b32c7a9156c668ee33?ds=inline;hp=-c Merge branch 'jc/branch-force-doc-readability-fix' Doc update. * jc/branch-force-doc-readability-fix: branch doc: sprinkle a few commas for readability --- a4ebf9e0c53d03677175a1b32c7a9156c668ee33 diff --combined Documentation/git-branch.txt index fe029ac6fc,3672195b3a..d6587c5e96 --- a/Documentation/git-branch.txt +++ b/Documentation/git-branch.txt @@@ -18,7 -18,6 +18,7 @@@ SYNOPSI '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. @@@ -97,19 -92,19 +97,19 @@@ OPTION 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. @@@ -207,8 -195,10 +207,8 @@@ start-point is either a local or remote branch.autoSetupMerge configuration variable is true. --set-upstream:: - If specified branch does not exist yet or if `--force` has been - given, acts exactly like `--track`. Otherwise sets up configuration - like `--track` would when creating the branch, except that where - branch points to is not changed. + As this option had confusing syntax, it is no longer supported. + Please use `--track` or `--set-upstream-to` instead. -u :: --set-upstream-to=::