I want to list the files present in another branch without doing a checkout, and according to View a file in a different Git branch without changing branches, this command is sufficient:
git show mybranch:mydir
Unfortunately, the output is not ideal because of the completely unnecessary tree mybranch:mydir
:
tree mybranch:mydir
.gitignore
Makefile
README
How can I list the files in another branch without getting any extra information (e.g. tree mybranch:mydir
)?