git-svn-abandon icon indicating copy to clipboard operation
git-svn-abandon copied to clipboard

git-svn-abandon-fix-refs deleting master

Open LeeWorrall opened this issue 8 years ago • 0 comments

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

LeeWorrall avatar Mar 14 '17 18:03 LeeWorrall