Whatever Kitchen
Whatever Kitchen

Reputation: 700

Force remove cached

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?

Upvotes: 6

Views: 6283

Answers (1)

qqx
qqx

Reputation: 19475

git rm --cached -f thefilename

Upvotes: 20

Related Questions