Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List files with git ls-files from root instead of current working directory

Tags:

git

I'm looking for a command similar to the following, but that always lists from the repository root, rather than the current working directory:

git ls-files --cached --others --exclude-standard

If possible I'd rather not use bash/batch, since I'm looking for a cross-platform solution.

like image 220
orlp Avatar asked May 12 '15 11:05

orlp


1 Answers

If Git aliases aren't an option, it can be done in 2 commands:

git ls-files $(git rev-parse --show-toplevel)
like image 185
Bluu Avatar answered Oct 23 '22 15:10

Bluu