If you are trying to ignore changes to a file that’s already tracked in the repository (e.g. a dev.properties file that you would need to change for your local environment but you would never want to check in these changes) than what you want to do is:
git update-index --assume-unchanged <file>
If you wanna start tracking changes again
git update-index --no-assume-unchanged <file>
You can use
git ls-files -v
If the character printed is lower-case, the file is marked assume-unchanged (git-scm.com/docs/git-ls-files)