How to ignore changes for files that are already tracked in Git

How to do

It’s simple, we can use the following commands:

git update-index --assume-unchanged src/example.js

If we want to watch the file changes again, we can use the following commands:

git update-index --no-assume-unchanged src/example.js

How to list the files that have been assumed unchanged:

git ls-files -v | grep '^h'

If you use Powerbash, use this:

git ls-files -v | Select-String -CaseSensitive '^h'

References