Skip to content

Commit

Permalink
Document new "already-merged" rule for branch -d
Browse files Browse the repository at this point in the history
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 <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Apr 15, 2010
1 parent f78683f commit fff0d0a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/git-branch.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ way to clean up all obsolete remote-tracking branches.
OPTIONS
-------
-d::
Delete a branch. The branch must be fully merged in HEAD.
Delete a branch. The branch must be fully merged in its
upstream branch, or in `HEAD` if no upstream was set with
`--track` or `--set-upstream`.

-D::
Delete a branch irrespective of its merged status.
Expand Down

0 comments on commit fff0d0a

Please sign in to comment.