I recently decided to put my various config files (dotfiles) in git, so as to make them more easily portable (and shareable): https://github.com/ergonlogic/.dotfiles
I'm relatively new to quite a few of these program (irssi, mutt, awesome) so I'm finding myself spending a lot of time figuring out how to configure them to my liking. I'd say I'm only about 60% of the way there, but it's still miles better than the alternatives (pidgin, thunderbird, gnome).
Anyway, one problem I ran into recently was how irssi saves it's config file, in that it includes a password (or two) in cleartext. I initially figured there was a script that solved this, but I haven't had any luck finding such a thing. So, I went with an old-school approach by building a little makefile that would sanitize the config file for posting to github:
<pre># Set our real passwords here as variables pwd1=f1r5t_f4k3_Pa55w0rd pwd2=s3c0nd_f4k3_Pa55w0rd</pre>
<pre>config.pub: config cp config config.pub # These lines should sed -i s/$(pwd1)/PASSWORD/g $@ # be indented with sed -i s/$(pwd2)/PASSWORD/g $@ # tabs </pre>
So, with that in place at ~/.irssi/Makefile, I can simply run "make" any time I update my irssi config, and it'll update and sanitize 'config.pub' which I'll then push as a commit to github.
I'm considering wrapping my whole dotfiles git workflow in a makefile that takes care of the whole thing for me. It could, for that matter include a sanitized version of the makefile itself...
Anyway, one small slip I made along the way was to include 'config_autosave,' which included stuff I didn't want appearing in the git history. Since this had dated back to the initial commit, I considered just deleting the repo from github, and starting it anew. However, I'd recently been cleaning up the commit history of another project (Casetracker Feeds Integration), and discovered this nifty trick: http://stackoverflow.com/questions/598672/git-how-to-squash-the-first-tw...