Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ryanpadilha/ab359a0d321beb97d559330ef57b9f7e to your computer and use it in GitHub Desktop.
Save ryanpadilha/ab359a0d321beb97d559330ef57b9f7e to your computer and use it in GitHub Desktop.
Git local cache cleaning
When you think your git is messed up, you can use this command to do everything up-to-date.
git rm -r --cached .
git add .
git commit -am 'git cache cleared'
git push
Also to revert back last commit use this :
git reset HEAD^ --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment