Git: stop tracking previously tracked file
If files were tracked, it is not enough to add them to .gitignore for git status
to ignore them.
You must also tell git to remove them from the working tree.
To do so, run:
$ git update-index --skip-worktree file1 file2
Source: https://git-scm.com/docs/git-update-index#_skip_worktree_bit
personal computing command-line interface (cli) gnu linux trisquel shell literacy wiki git