best way to record local modifications to an application's configuration files

Posted by Menelaos Perdikeas on Super User See other posts from Super User or by Menelaos Perdikeas
Published on 2012-06-27T20:11:33Z Indexed on 2012/06/27 21:20 UTC
Read the original article Hit count: 225

Filed under:

I often install applications in Linux which don't come in package form but rather one just downloads a tarball, unpacks it, and runs the app out of the exploded folder. To adjust the application to my environment I need to modify the default configuration files, perhaps add an odd script of my own and I would like to have a way to record all these modifications automatically so I can apply them to another environment. Clearly, the modifications can not be reproduced verbatim as things like IP addresses or username need to change from system to system; still an exhaustive record to what was changed and added would be useful.

My solution is to use a pattern involving git. Basically after I explode the tarball I do a git init and an initial commit and then I can save to a file the output of git diff and a cat of all files appearing as new in the git status -s.

But I am sure there are more efficient ways. ???

© Super User or respective owner

Related posts about git