Using GitHub for DotFiles

Most developers have a very specific setup they use, one that they are most comfortable with, while writing software. When moving from on computer to another, some developers can take hours to get their environment setup.

For me, I really need vim and a bunch of plugins to really feel effective.

Something many developers do, is store their setup files and configuration options on GitHub. We will call them “dot files”, since most *nix based systems, have their configuration options prefixed with a ‘.’ dot.

Using GitHub to do this is a great idea. Since most developers configuration is constantly evolving and we want to try out new things. With git you can go back if you find that some new setup you add isn’t working out.

What I suggest is to make a repo on GitHub, clone it down to your computer then drop your files in there, sans the dot. So your .bashrc will end up being just bashrc, that way it doesn’t show up hidden by default. Then just symlink that file to your home directory.

$ symlink bashrc ~/.bashrc

Everytime you make changes to your bashrc, vimrc, inputrc or anything else you might use, just commit your changes and push it back up to GitHub.

You can also get more advanced and write a setup script. Mine does all the symlinking for me, then installs vundler and tells it to pull down all the vundles I use.

Hopefully this will help you streamline the process of getting started when you get a new computer or new VM or even server.

You can checkout my dot files on GitHub.