Skip to content

Instantly share code, notes, and snippets.

@sawwd
Forked from joemaffia/git-clear-cache.sh
Created June 23, 2018 13:19
Show Gist options
  • Save sawwd/c5f13c5f0c6eef5a56087d92aac59024 to your computer and use it in GitHub Desktop.
Save sawwd/c5f13c5f0c6eef5a56087d92aac59024 to your computer and use it in GitHub Desktop.
Clear git cache
git rm -r --cached .
git add .
git commit -am 'git cache cleared'
git push
@sawwd
Copy link
Author

sawwd commented Jan 26, 2019

This is helpful when you aleardy have tracked files (eg *.log files) and you need to add them to .gitignore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment