git ls-files
does not provide a way to do this, so I come up with this:
git ls-files; git status --porcelain | grep ^?? | cut -d' ' -f2
But I wonder if there is a git native to do this to make it portable?
Simple trick (using git clean
):
git clean -n -d -x
That would list (as to be removed) all ignored and private files.
But that isn't based on a plumbing command.
Maybe:
git ls-files --others --exclude-standard -z
(From git-ready)
--others lists untracked files
--exclude-standard uses .gitignore and the default git excludes
-z null-delimited output
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With