Artificial intelligent assistant

Storing git results in a variable results in weird behaviour I have a git repository with 2 branches: $ git branch * master test/branch I can list specific branches individually by doing the following: $ git branch --list master * master $ git branch --list test/branch test/branch However, when I store this command as a variable, I get unexpected results: $ LOCAL=$(git branch --list master); echo $LOCAL index.php readme.md master $ LOCAL=$(git branch --list test/branch); echo $LOCAL test/branch The results aren't always consistent. Sometimes I get unexpected results from branches with forward slashes, sometimes without, depending on the repository I'm working with. I can't put my finger on what's happening exactly or why. Why does listing one branch list files in the directory and the branch itself, and the other one just lists the branch?

Above, it looks like Bash is expanding the `*` which appears at the start of `$LOCAL`. Try `echo "$LOCAL"`.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 8608581ce81cc54a49aa854c73316ccc