Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion book/01-introduction/sections/what-is-git.asc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[[_what_is_git]]
[[what_is_git_section]]
=== What is Git?

So, what is Git in a nutshell?
Expand Down
4 changes: 2 additions & 2 deletions book/03-git-branching/sections/nutshell.asc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

To really understand the way Git does branching, we need to take a step back and examine how Git stores its data.

As you may remember from <<ch01-getting-started#_what_is_git>>, Git doesn't store data as a series of changesets or differences, but instead as a series of _snapshots_.
As you may remember from <<ch01-getting-started#what_is_git_section>>, Git doesn't store data as a series of changesets or differences, but instead as a series of _snapshots_.

When you make a commit, Git stores a commit object that contains a pointer to the snapshot of the content you staged.
This object also contains the author's name and email address, the message that you typed, and pointers to the commit or commits that directly came before this commit (its parent or parents): zero parents for the initial commit, one parent for a normal commit, and multiple parents for a commit that results from a merge of two or more branches.

To visualize this, let's assume that you have a directory containing three files, and you stage them all and commit.
Staging the files computes a checksum for each one (the SHA-1 hash we mentioned in <<ch01-getting-started#_what_is_git>>), stores that version of the file in the Git repository (Git refers to them as _blobs_), and adds that checksum to the staging area:
Staging the files computes a checksum for each one (the SHA-1 hash we mentioned in <<ch01-getting-started#what_is_git_section>>), stores that version of the file in the Git repository (Git refers to them as _blobs_), and adds that checksum to the staging area:

[source,console]
----
Expand Down