I am getting my feet wet with Git and have the following issue:
My project source tree:
/
|
+--src/
+----refs/
+----...
|
+--vendor/
+----...
While generally correct your solution does not work in all circumstances. Assume a repo dir like this:
# ls **/*
doc/index.html README.txt tmp/dir0/file0 tmp/file1 tmp/file2
doc:
index.html
tmp:
dir0 file1 file2
tmp/dir0:
file0
and a .gitignore like this:
# cat .gitignore
doc
tmp/*
This ignores the doc
directory and all files below tmp
.
Git works as expected, but the given command for listing the ignored files does not.
Lets have a look at what git has to say:
# git ls-files --others --ignored --exclude-standard
tmp/file1
tmp/file2
Notice that doc
is missing from the listing.
You can get it with:
# git ls-files --others --ignored --exclude-standard --directory
doc/
Notice the additional --directory
option.
From my knowledge there is no one command to list all ignored files at once.
But I don't know why tmp/dir0
does not show up at all.