How to stop tracking a file already committed in git

Posted on October 26, 2016 by Michael Roma

Use the following command to remove a file or pattern from git:

git rm -r --cached my-file.js

You would then update your .gitignore to exclude this file or pattern

comments powered by Disqus