Ive made a new git alias to clear out all my old unused git branches but its crashing my git config when i add it? I don't see why since it worked in my bash when i put it in earlier. Or I thought it did anyway!
clean-unused = "!git branch --merged | egrep -v "(^*|develop)" | xargs git branch -d"
Ive added the ! before the first git command as I understand this will open a new shell to run the command in.
What seems to be the problem here?
The crashing message from git: fatal: bad config line 11 in file /Users/<userName>/.gitconfig
fatal: bad config line 11 in file /Users/<userName>/.gitconfig
Escape inner double quotes and backslashes:
clean-unused = "!git branch --merged | egrep -v "(^\*|develop)" | xargs git branch -d"
Just tested, works for me.
2.1m questions
2.1m answers
60 comments
57.0k users