How to clear git cache

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. 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 git cache. When you think your git is messed up and acting funky you need to clear git cache. Just follow below command for the clear cache.

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

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

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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s