I\'m using msysgit (1.7.9), and I\'m looking for the right invocation of the git ls-files command to show just the (tracked) files and directories at the curren
I'm surprised this is so hard... but don't get me started on my griping about git.
A variant on jthill's answer seems to be aliasable (hey, I'm a linguist, I have a license to make new words). The variant is
ls -d `git ls-tree HEAD | sed -e "s/^.*\t//"`
This uses 'ls' to format the output, so you get color coding (if you use that), etc. It also works as an alias:
alias gitls='ls -d `git ls-tree HEAD | sed -e "s/^.*\t//"`'
FWIW, you can also alias the recursive command, so that you used the 'ls' formatting (e.g. if your path+filenames aren't too long, you'll get two column output, color coding of executables, etc.)
alias gitls-r='ls `git ls-files`'