Hot to clear git cache

Hot to clear git cache

  • 14 July, 2018
  • Renish Khunt
  • GIT
  • 1068

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.

Make sure before clear cache commits your code and push it to the server.

Clear Git Cache

git rm -r --cached .
git add .
git commit -am 'git cache cleared'
git push origin master

How and when you need to clear Git cache. When you want to add any file/folder to git ignore at that time you need to clear cache. When you think your git is messed up and acting funky you need to clear cache. Just follow below command for a clear cache.

If you face any kind of issue after following the above step please write below the comment.