List ignored files with git –assume change

Posted on

Question :

I ignored some files in a git project and I just need to have the control to know which ones were ignored or not. It’s going to happen that some time I need to change.
I’ve tried all the commands below:

 1116  git --index-info
 1117  git check-ignore
 1119  git check-ignore ./
 1120  git ls-files -i
 1121  cat .git/ignore
 1122  cat .git/index 
 1123  git ls-files --others -i --exclude-standard

Thanks in advance for the help ..


Answer :

A simple way is to run the git clean -ndX command, which will preview the files that would be removed by the command without the -n parameter.

If you want to understand this command more and how this parameterization helps you in this situation, see the command manual on the Git website: link


Leave a Reply

Your email address will not be published. Required fields are marked *