Share via


The Discipline of Source Control

Here I am again about to rebuild my PC.

At this stage of cloud maturity for productivity, most of us will have all of our documents, emails and contacts stored in one kind of cloud service or another. As I try to migrate from the loan PC to the permanent PC I notice I’ve been my usual sloppy self, and there are plenty of documents on the Desktop, and in the My Documents folder. Those are easy enough to clean up, but then I come to my C:\code folder and realise there are a number of things in there that are about to be lost. 

It’s not that using source control is particularly hard, but it’s a discipline that needs to be practiced not only to protect assets worked on, but in my role to create a repository where I can easily share what I’ve been talking about with people I work with.

For a number of reasons, but mostly familiarity, I’m going to use GitHub. Creating a repository is incredibly simple, which means I’m up and running almost immediately. And as per above, I’m going to be making my repository public so that I can share what I’m working on with anyone who’s interested. Naturally the other key benefit is people can contribute as well.

Very important is to consider the license being used. For this repository which is going to store the code from my last post, I’m using the MIT license. MIT allows reuse of my code in most other licenses including GPL. There’s nothing secret in what the code does, and it can only be beneficial as an enabler to people who want to accelerate the setup of Open Live Writer, so an MIT license makes perfect sense. It’s something that does need to be understood though – there are many types of license available and the appropriate one for each type of code or project should be carefully considered.

image

After clicking Create Repository, I have my empty repository ready to be used.

image

Now I need to add my file(s). For what I have here, it’s really simple to just add them using the upload files button.

image

and now it’s available and safely in source control for the next time I need it.

image

It’s a really basic thing to do, and something that’s well understood and managed in a software developer’s day, but something I often forget until it’s too late. I’ll be trying to make this a good habit to form.