I am working on a maven project and I want to ignore the files generated and stored in the /target folder of my project (Evaluation) root folder.In the root of my git repository
This worked for me:
git update-index --assume-unchanged some.file