Git stores snapshots of a mini filesystem. When you make a commit, you are instructing git to take a snapshot of the files added to that commit.
Git uses diffs to efficiently store additional snapshots of the same file.
Git attaches metadata to each commit, such as a commit message, the author and a timestamp.
The set of all saved commits that can be checked out into the working directory.
The directory containing .git
and any files therein that have been checked
into git are part of the Working Tree.
Changes that you make to files here are not committed unless they are first
staged using git add
.
The current commit that is checked out into the working directory.
Tip: HEAD^
is shorthand for "the commit before HEAD
".
The set of changes to be committed. The staging area allows you to break large modifications into separate commits.