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>

Junio C Hamano committed Jan 18, 2023 at 23:23 UTC bf08abac565fa64eeaa56d2eb21ce1a9d2371358
1 file changed +4
Documentation/git-branch.txt
+4
@@ -123,6 +123,10 @@ OPTIONS
123 points to a valid commit. In combination with
124 `-m` (or `--move`), allow renaming the branch even if the new
125 branch name already exists, the same applies for `-c` (or `--copy`).
126 ++
127 +Note that 'git branch -f <branchname> [<start-point>]', even with '-f',
128 +refuses to change an existing branch `<branchname>` that is checked out
129 +in another worktree linked to the same repository.
130
131 -m::
132 --move::