I know, I know—everybody does it in our days. But the results are so sweet that I can’t resist a temptation to make a post myself. So, if your editor configuration is already uploaded to some hosting, and is version-controlled, please go away, you won’t learn anything new here. If not, go on reading—it should be this way.

My migration was driven by circumstances. Currently I simultaneously develop for 3 platforms—this means 3 developer hosts, and of course I want to have the same editor configuration under all of them. Previously I copied my .emacs file all around, and soon it became annoying. Especially if you’re subscribed to tips&tricks feeds and always experiment with new packages.

So the decision was made to move all the configuration under publicly hosted version control in order to be able to retrieve it wherever I may roam. Now the details: which version control and what hosting. As I can’t live without git, I chosen it. This made github a quite natural choice for hosting.

Moving all the setup to a repository and integrating current setups from different machines was the next task at hand. I decided to be as conservative as possible and move on in baby steps. Step one was to move current config file into a repository and load it from the “main” .emacs file—done, works. Great, move to the next step—introduce variables in order to obtain some flexibility—done, works. And so on. Pretty soon I gathered all the packages in the repository and uploaded it into github. The next step—clone it on the second machine, integrate changes and push them back. Then sync the repository on the first machine and test that it still works. After some iterations, all the stuff was in place.

After several days of using the new setup, I discovered another advantage of having editor configuration under a version control. Now I can experiment freely with new stuff and have no more commented out blobs of configuration code. If a package or macro doesn’t work, but looks promising and I don’t have time to deal with it now—just move it into a separate branch! Also if some setting feels like not so useful as it seemed initially—just revert it with a single command. Boy, now I’m agile! ;)