Last active
October 9, 2016 09:07
-
-
Save jamestrevorlees/1df8d0ceeb58d892e27c51b6485a8c20 to your computer and use it in GitHub Desktop.
Adding or removing files onto your .gitignore when you are already tracking
This file contains 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
Often we have to add or remove files from a gitignore. In order to do so I choose to recache git and this is how I do it: | |
1. make your .gitignore changes | |
2. Recache git | |
cmd: git rm -r --cached . | |
--> this tells git to remove the cache for all your files that are currently being tracked | |
3. Add all the files to git again | |
cmd: git add . | |
4. Commit this change and push to your remote repos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment