I want to delete all git local branches (except master) from *.bat file using command:
git.exe branch | grep -v "master" | xargs git branch -D
But this string includes "|" and the command fails.
Also doesn't work:
git.exe "branch | grep -v "master" | xargs git branch -D"
and
git.exe branch ^| grep -v "master" ^| xargs git branch -D