Git components
There are three main components of a Git project:
- Repository
- Working tree
- Index
The repository, or repo, is the “container” that tracks all changes to your project files. It holds all of the commits made by your team. You can access the commit history with the git log command.
The working tree, or working directory, consists of the files you are working on. You can think of a working tree as a file system where you can view and modify your files.
The index, or staging area, is where commits are prepared. Once staged, the files from the working tree are compared to those in the repo. Changes to files in the working tree are marked as modified before committing them.
