Skip to content

Instantly share code, notes, and snippets.

@theiwaz
Created April 8, 2020 07:56
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 theiwaz/d47c81a935065d5098501adfd81fb7eb to your computer and use it in GitHub Desktop.
Save theiwaz/d47c81a935065d5098501adfd81fb7eb to your computer and use it in GitHub Desktop.
// Remove files from index without deleting the files
git rm -r --cached .
// Add them to the index again
git add .
// Commit them with a meaningful comment
git commit -m ".gitignore fix"
//ref original source: http://www.codeblocq.com/2016/01/Untrack-files-already-added-to-git-repository-based-on-gitignore/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment