Skip to content

Instantly share code, notes, and snippets.

View mattbaker's full-sized avatar

Matt Baker mattbaker

  • New Relic
  • Portland, OR
View GitHub Profile
@zspencer
zspencer / .gitconfig
Last active April 6, 2016 00:17
git remove-extraneous-branches
[alias]
# Prints merged branches without the current working branch and mainline branches
extraneous-branches = "!f() { git branch --merged | grep -v -e 'gh-pages' -e 'master' -e 'staging' -e 'production'; }; echo `f`"
# Deletes the extraneous branches with a soft -d
remove-extraneous-branches = "!f() { git extraneous-branches; }; git branch -d `f`"
reb = remove-extraneous-branches