Last active
February 1, 2016 16:38
-
-
Save anthonycarminati/d250964178fc372a826e to your computer and use it in GitHub Desktop.
This code applies the logic defined in a .gitignore file, even after files have been committed to a repository. Note: this does not delete files locally, it only removes them from version control.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git rm --cached `git ls-files -i -X .gitignore` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
apply_gitignore
script from the repo's root folder