git-svn-abandon
git-svn-abandon copied to clipboard
git-svn-abandon-fix-refs deleting master
git-svn-abandon-fix-refs is deleting master for on svn repo I'm using this on the only difference I can see with that particular repo is that the last commit is a branch, would that cause git branch --merged to see master as being merged into that branch and the below would delete it?
git for-each-ref --format='%(refname)' refs/heads | while read branch; do
git rev-parse --quiet --verify "$branch" || continue # make sure it still exists
git symbolic-ref HEAD "$branch"
git branch -d $( git branch --merged | grep -v '^\*' )
done