Skip to content

Commit

Permalink
Merge pull request progit#1506 from tfiers/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ben authored Aug 28, 2020
2 parents 6862d4b + ba8da21 commit 9ece3ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions book/01-introduction/sections/what-is-git.asc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[[_what_is_git]]
=== 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#ch01-getting-started>>, 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>>, 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#ch01-getting-started>>), 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>>), 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

0 comments on commit 9ece3ec

Please sign in to comment.