11.1. Git Commits and Repos

Git allows you to save the state of your project files, called snapshots or commits, as you make changes to them. That way, you can roll back to any previous snapshot if you ever need to. Commit is a noun and a verb; pro- grammers commit (or save) their commits (or snapshots). Check-in is also a less popular term for commits.

Version control systems also make it easy for a software developer team to remain in sync with each other while they make changes to a project’s source code. As each programmer commits their changes, other program- mers can pull these updates onto their computers. The version control sys- tem tracks what commits were made, who made them, and when they made them, along with the developers’ comments describing the changes.

Version control manages a project’s source code in a folder called a repository, or repo. In general, you should keep a separate Git repo for each project you’re working on. This chapter assumes you’re mostly working on your own and don’t need the advanced Git features, such as branching and merging, that help programmers collaborate. But even if you’re working alone, there is no programming project too small to benefit from version control.