Tell Git To Ignore Local Changes Made To A File
Add a file to ignore list [1] ↗️
git update-index --skip-worktree <file-list>
And to reverse it
git update-index --no-skip-worktree <file-list>
To list files ignored [2] ↗️
git ls-files -v . | grep ^S
This is useful if you want to make some changes to a file for a workaround that only happens in your local machine. This will tell Git to ignore these changes.