How do I git rm a file without deleting it from disk? [duplicate]

git rm --cached file

should do what you want.

You can read more details at git help rm

Leave a Comment