Moving My Sites to GitHub

May 28, 2013

I’ve known the benefits of version control for quite a while now. I’ve dabbled in it a bit, but haven’t taken the plunge. That will soon change. I have finally made the decision to move most, if not all, of my personal sites and client sites over to GitHub in the next few months (deadline: end of August). I looked at a variety of options and determined a) Git is the best version control option and b) GitHub is the simplest and easiest way to use Git (especially if I don’t want to touch the command line, which I don’t).

I have been hesitant to start using version control for three primary reasons:

  1. Although fairly simple, there is a time investment and learning curve when it comes to setting it up. I simply haven’t had—or better said, made—the time to get it all setup.
  2. I have other ways to back-up my code, so why do I need version control. Between Time Machine, Packrat with Dropbox and manual backups, I thought I was covered with back-ups and so had no need for version control. I slowly realized this isn’t really the case and that version control has a lot of other benefits outside of backing up your code.
  3. I’m currently a one-man team, so managing all of the code locally works great. It is true that I loose some of the benefits of collaboration that comes with GitHub simply because I have no one to collaborate with many times. That said, I have found it is always better to get a good framework in place before the need really arise for it just to be prepared.

It may seem strange to write this post now, before I have made the switch. I am doing so for two reasons:

  1. Accountability. I’ve been saying I am going to do this for months now. I am hoping now that I have it in writing this I will make the commitment to actually do it by the end of August.
  2. Support. I would love to hear from any of you who have gone through this process before, what you learned, any suggestions you would make, etc. I’ve read a lot of articles, but at the same time am kind of winging it, so I’d appreciate any suggestions or support people can give.

My end goal with moving my sites to GitHub is three-fold:

  1. Tap into the benefits of version control with my code, so I can use branches, etc. to make changes to sites without effecting the live site.
  2. Organize my sites’ code. I currently have a process where all live sites are in my computer’s “Sites” folder and then I move them to the job folder once finished. This works great in some situations, but situations when I am continually making changes to the site or there are multiple versions of the site, it gets a bit hairy to say the least. Folder names like “sitename-new-prewordpress” are never a good thing.
  3. Although all my files are on Dropbox, having another cloud backup is never a bad idea.

I am hoping to write a second post in a few months once the process is complete to share what I have learned and the process I took. Stay tuned.

Andrew Pautler