A version control system (like git) is software that allows to keep track of the progress you have made in your codebase and very importantly allows reverting back to a previous state. Git is a version control system created to have the ability to handle thousands of people working on the same codebase while allowing easy management of your code.
So Matt and I have been working on some extremely complex projects and we realized that we need a better way to manage our code. That's when we decided to git in the habit.
A version control system (like git) is software that allows to keep track of the progress you have made in your codebase and very importantly allows reverting back to a previous state.
Which means if you break something you will be able to go back in time and fix it.
Git is a version control system created by Linux Torvalds (the creator of Linux). He wrote it to address the issues he had with other version control systems, mainly the ability to handle thousands of people working on the same codebase.
Why we use git
- Things are done locally by default - This may be a drawback to some, but I love this. I really am not comfortable pushing changes to someone until I'm sure it's working. This is especially true if I'm experimenting. Git does everything on your machine first, and then asks you to push to the server later. It may take another step, but that piece of mind is pretty nice.
- Easy Branching and Merging - Git makes it really simple to branch off and make experimental changes to a code base. Just a single command will make a new sandbox for you to experiment in. More importantly though, it allows an easy way to incorporate those changes into another branch if need be.
- Great tools - We use GitLab here and it provides us many useful features that we have come to depend on. These include comments on individual lines of code, visual changes and issue tracking.
- Use it your way - I generally live in a terminal, using vim and the command line git to do my work, and I find that it works for me. However, not everyone shares my love of the command line. But here’s something interesting: because of git's versatility, many IDEs have incorporated it to provide source control. XCode uses git interally and Coda allows painless integration with it. Matt was pretty happy to hear this.
It's easy to get started
One of key things that makes git so popular is the massive amount of documentation written for it. GitHub has made a 15 minute nteractive tutorial which offers a gentle introduction to the command line client. There are also introductory videos and referneces by the people who write git to help out new users.