Skip to content

Instantly share code, notes, and snippets.

@alxmjo
Created November 6, 2017 04:25
Show Gist options
  • Save alxmjo/1362d2c8065931d34f22d5766fb9d7bb to your computer and use it in GitHub Desktop.
Save alxmjo/1362d2c8065931d34f22d5766fb9d7bb to your computer and use it in GitHub Desktop.
// From: https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore
1. Commit pending changes
2. git rm --cached <file-name>
3. Commit again
4. Add the file to .gitignore
5. Verify git status
6. Commit again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment