After working for a few weeks, I always accumulate a lot of branches, frequently called feature/* or daniel/*.
From time to time, I delete all my local branches running this command (windows):
git branch -d (git branch --list 'feature/*').trim()
After frequently forgetting this command, I'd like to create an alias for it (with a string argument) ideally like this:
git del 'feature/*'
How can I create this alias?
I was trying this:
[alias]
del = '!set -eu; git branch -d (git branch --list "$1").trim()'
but it doesn't work and I ran out of ideas.