I run
.../$ git branch -a
master
temp
* version_1
remotes/origin/master
remotes/origin/temp
remotes/origin/version_1
but then:
.../$ v="$(git branch -a)"
.../$ echo $v
master temp bent bent.sh core LICENSE notes old README.md res version_1 remotes/origin/master remotes/origin/temp remotes/origin/version_1
I get that storing a variable this way removes the new lines (& need to look up how to fix that).
But why, oh why, is it adding my files (bent bent.sh core LICENSE notes old README.md res
) and how can I stop it?
I'm trying to get an array of branch names, so I can make a prompt to choose branch name via a number