This allowed me to tell git to ignore a specific file, even though it was already part of a project. All changes I make to it will be ignored:
git update-index --assume-unchanged Localization/el-GR.js
Notes
- It’s ignored by
git status, but not bygit pull. You can solve it with something likegit remote update && git checkout origin/main -- Localization/el-GR.jsin order to retrieve the updated version.
Source: http://codethug.com/2013/09/20/4-ways-to-ignore-files-with-git/