Skip to content

Instantly share code, notes, and snippets.

@mpukit
Created February 20, 2015 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mpukit/d845d79b60c84509c1d9 to your computer and use it in GitHub Desktop.
Save mpukit/d845d79b60c84509c1d9 to your computer and use it in GitHub Desktop.
Fix .gitignore so that it untracks every file that is newly placed in your .gitignore file
1) To untrack a single file that has already been added to your repo (to stop tracking the file but not delete it from your system, use:
git rm --cached <filename>
2) To untrack every file that is now in your .gitignore - commit changes, then:
git rm -r --cached .
This removes any changed files from the index (staging area). Then:
git add .
Commit all:
git commit -m ".gitignore is now working correctly"
@Skyway666
Copy link

But where do I put this commands???

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment