Using GIT for storing changes to local config files

Yes, sort of but as cracauer suggests, you also need to have a method of deploying those configs to the different locations. However, I have a couple of other thoughts (different theories) because you weren't very specific about your intensions.

Theory: You want to keep the config files for history / backup, essentially.
1. I like the use of `ptar` for storing config files. I haven't gotten around to implementing it's use 100% but from what limited use I have already setup, it is very nice (to grep/vim my backups when needed). Set up a cron schedule to just back up your configs in a 'ptar' archive. I use: "~/.stash/".


Theory: you want to share those config files.
2. Use `entr` to copy the config files. This is on my todo list because this would be a better method to keep my ".vimrc" (for example) copied/sync'd amongst all my machines.

 
Instead of having git being a copy and installing (copying) the files from there to /etc there also is the method of symlinking into the git tree.

I don't recommend that because you have no defense against a screwed up git checkout. /etc/pam.d/* will be very unhappy with you if there are git conflict markers in the files.
 
Back
Top