Git · Junior · Question 24 of 75
How do you delete a local branch that has been merged?
- ✓Correct answer:
git branch -d feature - 2
git switch --delete feature - 3
git rm feature
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.