Im trying to create a git alias to this command:
git branch -vv | grep ': gone]'| grep -v "\*" | awk '{ print $1; }' | xargs -r git branch -d
I've tried different things: enclosing the command with "", adding ! is needed for the pipes... but I cannot make the command work inside the alias. Do you have any idea?
Thanks!
Don't bother making it an alias. Just drop it into a file named
git-mycommandsomewhere in your$PATH(maybe~/bin); now you can rungit mycommandand it will run that script.Having said that, this might work: