What is git?
git
is a version control system (vcs) used by many programmers today.
Think of a vcs as a backup for your files (like Mac's Time Machine).
- It helps you make 'copies' as you go, in case you do something wrong and need to go back.
- It also provides you with a time frame of your changes.
Having a time frame of changes is useful not only as a way to see how far you've come, but also can be really helpful when tracking down a bug. "I first experienced the bug about a week ago..." and you can see what changed around then.
Other types of vcs include svn
, mercurial
, and cvs
. We will only discuss git
in this tutorial.
Why do I need a version control system?
- Having a log of your changes makes it much easier to track down and fix bugs.
- It gives you the freedom to explore different ideas at the same time without losing one or the other (see branching later).
- It makes collaborating and contributing to projects much easier. By using a vcs, you can see exactly what someone changed on your project, so you can evaluate if you want to incorporate the change or not. (see pull requests later)
Why choose git?
I can't tell you why you should use git
over the other vcs choices. Personally, I think its the best. Its also one of the most popular, having an entire website of projects based around it (GitHub).