DEV Community

Discussion on: Don't commit that file!

 
dovidweisz profile image
dovidweisz

git rm --cached path/to/file

Cool I learned something new today

But I'm a little confused about your use case. It seems to me that adding the file to .gitignore would do the trick.

Thread Thread
 
bronzehedwick profile image
Chris DeLuca

The use case in my post is admittedly pretty specific, but we don't want to add the config files to .gitignore because the files are needed for the codebase to run properly. These config files also happen to have debugging options in them, so you have to modify the git working tree to enable them.