Skip to content

Latest commit

 

History

History
43 lines (25 loc) · 1.01 KB

06.md

File metadata and controls

43 lines (25 loc) · 1.01 KB

Git: beyond the basics

Basic Concepts

Git Takes Snapshots

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.

Git repository

The set of all saved commits that can be checked out into the working directory.

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.

HEAD

The current commit that is checked out into the working directory.

Tip: HEAD^ is shorthand for "the commit before HEAD".

Staging area

The set of changes to be committed. The staging area allows you to break large modifications into separate commits.


back

next