Files already tracked by Git are not effected by the
If you want to ignore a file that you've committed in the past,
>>(double redirection arrow) to append a relative file path to your
.gitignoredirectly from the terminal.
git rmwith the
--cachedoption to delete the file from your remote repository, but keep it in your working directory as an ignored file.
$ echo debug.log >> .gitignore $ git rm --cached debug.log rm 'debug.log' $ git commit -m "Start ignoring debug.log"