re: 11 Painful Git Interview Questions You Will Cry On VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Q10: How to remove a file from git without removing it from your file system? I think a better way to do this is git rm --cached filename ?? Corr...
 

You are correct. From git-rm documentation

--cached
Use this option to unstage and remove paths only from the index. Working tree files, whether modified or not, will be left alone.
code of conduct - report abuse