Last active
April 3, 2021 09:01
-
-
Save williamluisan/332b8c9b503eb67188cc0f08e12d3b37 to your computer and use it in GitHub Desktop.
Gitignore reset cache
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
### STEP 1 ### | |
Adding "your path to file" you want to ignore in .gitignore | |
### STEP 2 ### | |
(choose one of the options) | |
# option(1) (recommended) Remove the cache of all the files | |
git rm -r --cached . | |
# option(2) Remove the cache of specific file | |
git rm -r --cached <file_name.ext> | |
### STEP 3 ### | |
git add -A | |
### STEP 4 ### | |
git commit -m "Update .gitignore and refresh cache" | |
### STEP 5 ### | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment