Just how to remove a documents from the git index

Just how do I remove a documents from a git repositorie's index without getting rid of the documents from the functioning tree?

If I had a documents ./notes.txt that was being tracked by git, I can run git rm notes.txt. Yet that would certainly remove the documents. I would certainly instead desire git simply to stop tracking the documents.

2019-05-04 19:25:37
Source Share
Answers: 1

You can simply make use of git rm --cached notes.txt. This will certainly maintain the documents yet remove it from the index.

2019-05-08 07:42:24