aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-18 23:23:46 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-18 23:48:11 -0800
commitbf08abac565fa64eeaa56d2eb21ce1a9d2371358 (patch)
treefbf74ed05a3132357fee52928a13eb912f3113ad /Documentation/git-branch.txt
parent37537d6472d87098d455b6a0c36885997ea81a85 (diff)
downloadgit-bf08abac565fa64eeaa56d2eb21ce1a9d2371358.tar.gz
branch: document `-f` and linked worktree behaviour
"git branch -f name start" forces to recreate the named branch, but the forcing does not defeat the "do not touch a branch that is checked out elsewhere" safety valve. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-branch.txt')
-rw-r--r--Documentation/git-branch.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-branch.txt b/Documentation/git-branch.txt
index 12c5f84e3b..2aaf13b45d 100644
--- a/Documentation/git-branch.txt
+++ b/Documentation/git-branch.txt
@@ -123,6 +123,10 @@ OPTIONS
points to a valid commit. In combination with
`-m` (or `--move`), allow renaming the branch even if the new
branch name already exists, the same applies for `-c` (or `--copy`).
++
+Note that 'git branch -f <branchname> [<start-point>]', even with '-f',
+refuses to change an existing branch `<branchname>` that is checked out
+in another worktree linked to the same repository.
-m::
--move::