aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-branch.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-01-27 08:51:41 -0800
committerJunio C Hamano <gitster@pobox.com>2023-01-27 08:51:41 -0800
commit8f82904caf130112a3373a63116e94e6ae31e56d (patch)
treebab06123da4731c299d0c236a1ef89bdb4c8d33a /Documentation/git-branch.txt
parent630ae5ee65a4e3ed769af04acfcb1fd9b22b3675 (diff)
parentbf08abac565fa64eeaa56d2eb21ce1a9d2371358 (diff)
downloadgit-8f82904caf130112a3373a63116e94e6ae31e56d.tar.gz
Merge branch 'jc/doc-branch-update-checked-out-branch'
Document that "branch -f <branch>" disables only the safety to avoid recreating an existing branch. * jc/doc-branch-update-checked-out-branch: branch: document `-f` and linked worktree behaviour
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 aa2f78c4c2..d382ac69f7 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::