diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-10-03 16:10:59 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-10-03 16:10:59 +0900 |
commit | 139b7d1a5a53f1b27057bbb37a7a4a14959f6a79 (patch) | |
tree | df84f1b9ecd85274fdef383894621dab2b08fd5a /git-branch.txt | |
parent | ef75f377a0a3170ce7d5664cab4a6057d91f59c8 (diff) | |
download | git-htmldocs-139b7d1a5a53f1b27057bbb37a7a4a14959f6a79.tar.gz |
Autogenerated HTML docs for v2.14.2-746-g8fb8a9
Diffstat (limited to 'git-branch.txt')
-rw-r--r-- | git-branch.txt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/git-branch.txt b/git-branch.txt index 58f1e5c9c..fe029ac6f 100644 --- a/git-branch.txt +++ b/git-branch.txt @@ -18,6 +18,7 @@ SYNOPSIS 'git branch' (--set-upstream-to=<upstream> | -u <upstream>) [<branchname>] 'git branch' --unset-upstream [<branchname>] 'git branch' (-m | -M) [<oldbranch>] <newbranch> +'git branch' (-c | -C) [<oldbranch>] <newbranch> 'git branch' (-d | -D) [-r] <branchname>... 'git branch' --edit-description [<branchname>] @@ -64,6 +65,10 @@ If <oldbranch> had a corresponding reflog, it is renamed to match renaming. If <newbranch> 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, `<branchname>` 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. @@ -104,7 +109,7 @@ OPTIONS 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:: @@ -113,6 +118,13 @@ OPTIONS -M:: Shortcut for `--move --force`. +-c:: +--copy:: + Copy a branch and the corresponding reflog. + +-C:: + Shortcut for `--copy --force`. + --color[=<when>]:: Color branches to highlight current, local, and remote-tracking branches. |