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 !
git rm --cached filename
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.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
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