Git Introduction
Git is a version control tool. It saves snapshots of your files and keeps the history between them.
Check Git is installed
This command prints the Git version on your machine.
$ git --versionFind where Git lives
This command prints the folder that holds the Git program.
$ which gitExample
$ git --versionKey points
- Git runs on your own computer.
- You type Git commands in a terminal.
- A terminal is a window where you type commands as text.
- Git stores the history in a folder called a repository.
- A repository is a project folder that Git watches.
- A snapshot is one saved state of the project.
- Git calls a snapshot a commit.
- You will make your first commit in a few lessons.
- Git is free, and it works without the internet.
Here, one command checks the install. The answer names the version: 2.43.0. A different number on your machine is fine. It only means your Git is newer or older.
Note
Git works best with plain text files.
Try it Yourself
Edit the code, then press Run.
Running is simulated
Exercise
Where does Git store the history of a project?