Git · Junior · Question 24 of 75

How do you delete a local branch that has been merged?

Explanation

-d refuses to delete a branch with unmerged commits; -D forces it. Deleting a branch removes only the pointer; commits reachable from other branches stay.

Further reading

Problem with a question

Git · Junior · question 24

Test yourself

Take the Git · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz