Created
May 31, 2013 19:45
-
-
Save dustintheweb/5687508 to your computer and use it in GitHub Desktop.
The fix for when a file is added to .gitignore, but git is still acknowledging its existence...
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
1) edit the file as needed and back it up somewhere | |
2) physically delete the file in question (not the backup) | |
3) edit .gitignore and add path/filename.file | |
4) remove the file from git using git rm filename.file | |
5) git add / commit the change | |
6) copy / paste the backup back into the source folder | |
7) git status - if done correctly, git will no longer pick up the file | |
// this issue typically happens when you add a file to .gitignore after the file has already been checked in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment