I discovered a file in my project that are not under source control. I then add it to source control, and all is well. Is there a GIT command line I could execute to check if there are any other files not under source control?
I've tried a number of options on 'GIT LS-FILES', but haven't found anything that reveals the files.
CodePudding user response:
Using git ls-files : you can use
git ls-files --exclude-standard -o
-o is short for --others :
-o
--othersShow other (i.e. untracked) files in the output
By default, git ls-files does not honor the .gitignore files, you have to add --exclude-standard if you want to hide files that should be ignored.

