Skip to content

Instantly share code, notes, and snippets.

@edtoken
Last active October 10, 2017 08:46
Show Gist options
  • Save edtoken/b99528d46249f7b50d17ac0a246f7e57 to your computer and use it in GitHub Desktop.
Save edtoken/b99528d46249f7b50d17ac0a246f7e57 to your computer and use it in GitHub Desktop.
short helper for git users

View all remote branches merged to current

git fetch -p && git for-each-ref --sort=committerdate --format='%(refname:short) * %(authorname) * %(committerdate:relative)' refs/remotes/ | column -t -s '*' | grep "$(git config user.name)"

Delete local branch

git branch -d BRANCH_NAME

Delete remove branch

git push origin --delete BRANCH_NAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment