Reputation: 597
Can I remove branches using the commands below?
Local branch:
git branch -d <branchName>
Remote branch:
git push origin --delete <branchName>
Upvotes: 0
Views: 168
Reputation: 24508
Yes.
One thing you should be aware of is that -d
is a "safe" delete: it'll only let you delete a branch that's merged in to your current HEAD
. If you want to delete any branch, use -D
:
git branch -D <branchName>
Upvotes: 5