Before learning about Git, let us first understand what revision control is.
Revision control is the process of managing versions of as they evolve, such as tracking the versions of a project's files. You can do this by hand: each time you make some changes, you save the project folder under a new descriptive name (e.g., Project-Foo-v1.2 (after fixing memory leak)). But this is tedious and error-prone, especially when multiple people work on the same project.
Revision Control Software (RCS) automates revision control. Modern RCS tools can handle large teams working together on projects with thousands of files. RCS tools are also known as Version Control Software (VCS), and by .
Revision vs Version
- Revision ("How it changed"): A discrete change made to an artifact at a specific point in time. For example, an edit that fixes a typo in the file
README.mdis a revision to that file. - Version ("What it is"): A specific state of an artifact, usually the result of one or more revisions. For example, after fixing that typo, you have a new version of
README.md.
In everyday conversation, these two terms are often used interchangeably. We'll do the same in these lessons.
A revision control tool can:
- track your project's history, recording who made each change, when, why, and what changed.
- make collaboration easier, for example by helping you spot and resolve conflicting changes made around the same time.
- help you recover from mistakes, letting you revert to an earlier version and even pinpoint when a problem was introduced.
- let you work on multiple versions at once and manage the between them.
Git is the most widely used RCS today. It is a free and open-source tool created by Linus Torvalds in 2005 to manage the development of the Linux kernel. Other RCS tools include Mercurial, Subversion (SVN), Perforce, CVS (Concurrent Versions System), Bazaar, TFS (Team Foundation Server), and ClearCase.
GitHub is a web-based platform for hosting projects that use Git for revision control. Other similar services include GitLab, Bitbucket, and SourceForge.