All Your Git Belong to Us
What is version control?
June 14th, 2015
There are different types of version control in software development but for now I’m going to address something called “distributed” version control, the most popular of which is Git.
Imagine all the files for your project, all the countless lines of code. How did it get there? Did it all flow out at once as if you were writing a book? Maybe… but it’s not likely. If you are like most people, you broke your project down into pieces, and worked on those pieces separately. Sometimes those pieces didn’t play well together, and sometimes everything just fit perfectly and it was like symphony orchestra began playing. Either way, you need version control.
Version control is simply a controlled system that will record changes to your files so you can go back and reference them at a later time. It allows you to go back in time basically. As a rule of thumb, new developers should commit and commit often. Git will fully mirror a local repository including all changes made to branches in the cloned files. The files aren’t stored locally, so no need to worry about your hard disk crashing and burning, and also the files are available to access anywhere. The benefits of non-local versioning may not be obvious on the surface but in scenarios of collaboration it really becomes apparent.
When multiple people are working on the same code, often in different pieces, at the same time. Those code pieces won’t always agree with each other, and an administrator can ‘go back’ in time to a previous version of the code that did work. Git will also track all the changes made to a set of code line by line so anybody can readily see what’s broken.
Version control is a great habit, and git will help create it.