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


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 ?? Correct me if i am wrong !


You are correct. From git-rm documentation

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