sublimehq / sublime_merge

Issue tracker for Sublime Merge
https://www.sublimemerge.com
276 stars 14 forks source link

Workflow to delete merged branches #340

Open wickedchicken opened 5 years ago

wickedchicken commented 5 years ago

Problem description

I use a GitHub PR-based workflow, where merging to master is done server-side without using my git client. This means that I have local branches that I have to switch away from and manually clean up.

Preferred solution

A way to delete git local git branches that have been merged upstream. Right now I do this by running git branch --merged | egrep -v "(^\*|origin/master)" | xargs git branch -d which says "delete any local branch that has been merged into the current branch except the current branch itself and origin/master (which is a bit redundant but I have it there just in case). I don't expect this exact workflow to show up in Sublime Merge but it would be nice to have something like it.

Alternatives

Maybe flagging branches that have been merged into origin/master or something, I'm not particularly sure.

wickedchicken commented 5 years ago

(It's possible an alternative could be worked out with https://github.com/sublimehq/sublime_merge/issues/230, maybe "select all branches merged into X" followed by a delete command from the user).