--- tags: - git --- This is where `git rm` comes in: If we add `--cached` it removes a file from the git repository (but it will stay in the working directory). ```bash $ echo debug.log >> .gitignore    $ git rm --cached debug.log rm 'debug.log'    $ git commit -m "Start ignoring debug.log" ```