I want to write a script that will run
git diff --name-status master..<BRANCH>
but when I run this:
for i in $(git branch | grep -v master); do
echo $i;
done
I get echo one directory because git branch echo asterisk (I have one directory in current directory)
* <SELECTED BRANCH>
Why * is expanded and how can I prevent that expansion?
UPDATE: I can prevent this by using this:
for i in $(git branch | tr -d '*' | grep -v master);
done;
But why is this happening? Why I need to remove asterisk?
quotes" "