How to check all your untracked git files in the terminal.
--
Sometimes, when you periodically change your machine. You’d never expected that you might lose your codes. Cause you always use git.
But how about you haven’t tracked a few essential files?
Pods folder and node_modules are no problem, but how about regular code or environment files?
That is, you need to be careful and do double-check.
Here is a command to check all of the untracked and ignored files
List ignored files
$ git ls-files . --ignored --exclude-standard --others
List untracked files
$ git ls-files . --exclude-standard --others
You can use grep with the invert option to see all untracked files except specific directories, such as the Pods directory.
$ git ls-files . --ignored --exclude-standard --others | grep -v Pods
Don’t forget to check whether your repository is perfectly synced as follows as your expectancy.