Chapter 1.2.1 - Understanding Version Control, Repositories
Version Control
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later. Git essentially takes snapshots of your code—it records the entire state of your project at different moments in time so that you may revert to those snapshots if needed.
Git Repository
A repository is simply a directory that somebody has initialized with Git.
In order to initialize Git inside a directory, type the following command into your command line (remember to use Git Bash if you are on Windows):
git init
This command creates a .git subfolder in your directory where Git keeps track of your changes. By default, files and directories that starts with a period . are not visible in Finder or File Explorer. To see hidden files, enable this setting in your operating system or run ls -a.
If you ever clone (copy) someone else's repository, it should already contain .git/ inside and so you don't have to run git init.
In short, a repository (or just "repo") is a set of files and subfolders that Git tracks for you.