Skip to content

Commit 970900a

Browse files
committed
Merge branch 'jc/doc-branch-update-checked-out-branch' into next
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
2 parents fff9b60 + bf08aba commit 970900a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Documentation/git-branch.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ OPTIONS
123123
points to a valid commit. In combination with
124124
`-m` (or `--move`), allow renaming the branch even if the new
125125
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.
126130

127131
-m::
128132
--move::

0 commit comments

Comments
 (0)