Version control with git and GitHub

How to keep your friends

June 12th, 2015

Welcome to my first blog post! Every week I will write about my learning experience at Dev Bootcamp which just started! More specifically I will do my best to share the tools and concepts I'm learning about throughout the curriculum. A key topic we covered this week was version control and how to use git and GitHub.

Version control is a concept that can apply to anything that is being built and modified, be it a word document or a piece of software. The idea is to keep track of every change that is brought to a document, different changes create different versions and keeping a record of everything allows us to understand the evolution of the document and go back in time if we realize we made a mistake. A good version control system (vcs) keeps a log of various information such as the time of the change, the author and thorough descriptions.

One of the most well-known vcs out there is the "track changes" feature of Office Word. Imagine you're working on a big school project with 3 of your friends: you draft a first version that is then circulated to everyone who go about their business using the track changes feature. The new version is then sent back to you, you open it up and it's a real mess! There are dozens of anotations everywhere, the document is all cluttered and became very hard to read. And yet this is assuming that they all went through the document one after the other. In case of parrallel changes, the situation becomes impossible.

Then git comes in! Git is an open-source software that is widely used among the developpers community. It allows you to keep track of every change you make to your file and comment on them so you understand the evolution of the project. To keep it organized, the code update is written on a copy of the file, also named branch. The main file it is copied from is called the master-branch and the copy can be called anything, but in most cases we call it the feature-branch or change-branch. Once the update is ready to go, you merge the feature-branch into the master-branch. We can work on as many branches as we want, everything remains clean. This is all done locally on your computer. But then, how do you manage your friends?

Then GitHub comes in! Their tagline "social coding" says it all, it allows developpers to share code with the rest of the world. Beyond sharing GitHub is a powerful collaboration tool: your friends can work on local branches of their code and then submit those changes online to you, the project manager, who can allow the merge or require further explanation. With 9.7 millions users, working on 23.4 repositories, GitHub has become huge in the software development community. Learning how to use it is the first key step to becoming a great developper. Well, let me confirm that in 4 months :-)

I hope this was helpful. As you can see there is no comment section nor contact page yet. But I would love to receive your feedback, questions or comments: gael.bergeron@gmail.com

Cheers!