Last active
April 17, 2016 03:36
-
-
Save cognivator/aa37d55c7b8bfab6fd9c51d57c871861 to your computer and use it in GitHub Desktop.
.gitignore cache cleaning
This file contains 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
#!/bin/bash | |
# Run this from the root of a git repo - AFTER YOU COMMIT THE CHANGES YOU CARE ABOUT! | |
# Then, if you need to keep the deleted files in your working copy (e.g. IDE config files), | |
# be sure to unstage them before your next commit. | |
# attribution: http://www.randallkent.com/2010/04/30/gitignore-not-working/ | |
for file in `cat .gitignore` ; do git rm -r --cached $file; done | |
for file in `cat ~/.gitignore_global` ; do git rm -r --cached $file; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment