Skip to content

Instantly share code, notes, and snippets.

@raphaelchaib
Created January 13, 2015 14:13
Show Gist options
  • Save raphaelchaib/f9a083a03e06123b9177 to your computer and use it in GitHub Desktop.
Save raphaelchaib/f9a083a03e06123b9177 to your computer and use it in GitHub Desktop.
Make GIT forget index files and then, on new commit, respect .gitignore
The series of commands below will remove all of the items from the Git Index (not from the working directory or local repo), and then updates the Git Index, while respecting git ignores. PS. Index = Cache
First:
git rm -r --cached .
git add .
Then:
git commit -am "Remove ignored files"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment