Skip to content

Commit fff0d0a

Browse files
jrngitster
authored andcommitted
Document new "already-merged" rule for branch -d
v1.7.0-rc0~18^2 (branch -d: base the "already-merged" safety on the branch it merges with, 2009-12-29) taught ‘git branch’ a new heuristic for when it is safe to delete a branch without forcing the issue. It is safe to delete a branch "topic" without second thought if: - the branch "topic" is set up to pull from a (remote-tracking, usually) branch and is fully merged in that "upstream" branch, or - there is no branch.topic.merge configuration and branch "topic" is fully merged in the current HEAD. Update the man page to acknowledge the new rules. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f78683f commit fff0d0a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Documentation/git-branch.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ way to clean up all obsolete remote-tracking branches.
6363
OPTIONS
6464
-------
6565
-d::
66-
Delete a branch. The branch must be fully merged in HEAD.
66+
Delete a branch. The branch must be fully merged in its
67+
upstream branch, or in `HEAD` if no upstream was set with
68+
`--track` or `--set-upstream`.
6769

6870
-D::
6971
Delete a branch irrespective of its merged status.

0 commit comments

Comments
 (0)