I keep my most important dotfiles in version control so I can access them from different machines and revert changes to them that aren't working out. I can't promise that they'll work for you, but they're good enough for my simple needs.
I lifted some of the clever bits from others:
- Jeffery Neitzel: KSH functions that I use in my zshrc
- Dan Callahan: some handy git aliases.