Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Force remove cached

Tags:

git

May I know what is the command in terminal to force remove cache from GIT?

As per what I know to remove GIT is git rm --cached thefilename

But now I am getting an error

error: 'tutorial.h' has staged content different from both the file and the HEAD (use -f to force removal)

So, may I know how am I going to remove this?

like image 715
Whatever Kitchen Avatar asked Oct 31 '12 02:10

Whatever Kitchen


People also ask

Why is the cache not clearing?

Here are some ways you can try to fix your caching problem, in order of escalation: Try holding down the Shift key while pressing the Refresh button. Close your browser and re-open it (make sure you are NOT on the cached page) and delete your temporary Internet files (clear your cache).

How do I clear my browser cache HTML?

Click on “Privacy & Security” on the left side menu. Step 4: Scroll down a bit until you find the “Cookies and Site Data” section, then click on “Clear Data…”. Step 5: Select “Cached Web Content” to clear your browser cache. Step 6: Select “Cookies and Site Data” to clear your browser cookies.


1 Answers

git rm --cached -f thefilename
like image 91
qqx Avatar answered Oct 09 '22 04:10

qqx