Setting up Git to ignore changes on existing config files

Git is a powerful tool for version control and managing changes in code. One of my main issue on using it on real projects, are config files. I couldn’t just add them to the .gitinore-file, because I needed them to be there, but I didn’t want them to accidentally be included in any commits and screw up the working copies. While looking for a fix to this issue, I stumbled upon an option to tell git to ignore changes on specific files: git update index --skip-worktree <file1> <file2>. ...

March 7, 2023 · 2 min · Marcel Jurtz