Remove files from Git's index without deleting the actual file
To remove a file from the Git version control system without actually removing the file on disc, use
git rm --cached filewhere
fileis the name of the file to be deleted. See also How do I untrack a file?.
Copyright © Ben Bullock 2009-2023. All rights reserved. For comments, questions, and corrections, please email Ben Bullock (email@example.com) or use the discussion group at Google Groups. / Privacy / Disclaimer