4

Use
git branch --merged
to get, you guessed it, all the branches you have merged.

Use
git branch -d <branch-name>
To delete a branch if it has been merged (use -D for forced)

And Use,
git branch --merged | egrep - v "(^\*|master|dev)" | xargs git branch - d

To delete all the branches that you have merged (but not anything with master/dev in their names)

Sorry for the formatting, I don't know how coder formatting works on DR..

Comments
Add Comment