Since Ovid seems to be getting buried under "Duh! - Use a revision control system" comments, I thought I'd describe my solution here.
I have a CVS repository (I'd use SVN if I was starting from scratch) that contains my 'dot' files and other stuff. I check it out into a directory called '.common-configs' with a command like this:
cvs -d ":ext:grant@cvs.server/cvs" co -d .common-configs grant/configs
Then I cd into .common-configs and run './install' which interactively walks me through installing each of the files. Some of them are a straightforward replacement of the default ~/.file with a symlink to ~/.common-configs/file. And some of them leave machine-specific things in ~/.file and append the necessary entry to include the contents of ~/.common-configs/file.
So what's in my CVS repository?
The hints file is becoming increasingly necessary as my memory fails and the scope of technologies I deal with increases. The hints file itself is merely a plain text file of one-line entries of the form:
keywords:command
My bashrc file defines one shell function and one alias:
function hint() { test -n "$*" && sed -n "/$*/Is/^\([^:]*:\) *\(.*\)$/\1\n\2\n/p" ~/.common-configs/hints } alias vihints='vi ~/.common-configs/hints'
Then when I want to be reminded of (for example) the command syntax for fixing a typo in a CVS commit message, I just type:
hint cvs fix
and get a response like this:
cvs fix comment: cvs admin -m 1.12:"replacement commit message here"
The point is that the output from 'hint' is something that I can cut and paste and adapt to my current requirement. The other important thing is that the things in the hints file are things I have had to search for and things I find useful. It's not clogged with things that other people think I need to know. Therefore I won't tell you what is in the file but just tease you with a random sample of topics covered:
Re:dotfiles everywhere
skangas on 2006-06-24T23:05:20
I have a CVS repository (I'd use SVN if I was starting from scratch)
How do I convert an existing CVS repository into a Subversion repository?
I have to confess, I haven't come around to convert my repository either./Stefan Kangas