I don't understand the behavior of Bash in this case:
If I type git branch
, I get a list of branches.
BUT if I try to put it into a variable, say, b=`git branch`; echo $b
, I get an output as if I made ls; git branch
. The content of a directory is listed together with the branches.
Could someone please explain this behavior?