Created
July 29, 2013 19:31
-
-
Save Aeramor/6107060 to your computer and use it in GitHub Desktop.
Remove any files from the repo that are in the gitignore, even after the fact. Just copy paste the whole thing into terminal/commandline (in the correct directory) and it will un-track the files (but leave them intact locally).Then use git status to verify nothing important was removed.
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_INDEX_FILE=some-non-existent-file \ | |
git ls-files --exclude-standard --others --directory --ignored -z) | | |
xargs -0 git rm --cached -r --ignore-unmatch -- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: You have to navigate to the folder where the file you want ignored is located before running this command!