Skip to content

Commit 23561c6

Browse files
Charlie O'KeefeCharlie O'Keefe
Charlie O'Keefe
authored and
Charlie O'Keefe
committed
Minor edits to Introduction section of book (01 through 03 in source)
1 parent 504b08d commit 23561c6

File tree

7 files changed

+23
-37
lines changed

7 files changed

+23
-37
lines changed

text/01_Introduction/0_ Introduction.markdown

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ minutes to read through.
1818
Next we will go over **Intermediate Git Usage** - things that are slightly more
1919
complex, but may replace some of the basic commands you learned in the first
2020
section. This will mostly be tricks and commands that will feel more
21-
comforatble after you know the basic commands.
21+
comfortable after you know the basic commands.
2222

2323
After you have all of that mastered, we will cover **Advanced Git** - commands
2424
that most people probably don't use very often, but can be very helpful in
2525
certain situations. Learning these commands should round out your day-to-day
26-
git knowledge, you will be a master of the Git.
26+
git knowledge; you will be a master of the Git!
2727

2828
Now that you know Git, we will then cover **Working with Git**. Here we will go
2929
over how to use Git in scripts, with deployment tools, with editors and more.
30-
These sections are meant to help you integrate Git into your environement.
30+
These sections are meant to help you integrate Git into your environment.
3131

3232
Lastly, we will have a series of articles on **low-level documentation** that may
3333
help the Git hackers who want to learn how the actual internals and protocols

text/02_Git_Object_Db_Basics/0_ Git_Object_Db_Basics.markdown

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ looks something like this:
1111
You will see these 40-character strings all over the place in Git.
1212
In each case the name is calculated by taking the SHA1 hash of the
1313
contents of the object. The SHA1 hash is a cryptographic hash function.
14-
What that means to us is that it is impossible to find two different
14+
What that means to us is that it is virtually impossible to find two different
1515
objects with the same name. This has a number of advantages; among
1616
others:
1717

@@ -32,7 +32,7 @@ type of object it is, and there are four different types of objects:
3232

3333
- A **"blob"** is used to store file data - it is generally a file.
3434
- A **"tree"** is basically like a directory - it references a bunch of
35-
other trees and/or blobs (ie. files and sub-directories)
35+
other trees and/or blobs (i.e. files and sub-directories)
3636
- A **"commit"** points to a single tree, marking it as what the project
3737
looked like at a certain point in time. It contains meta-information
3838
about that point in time, such as a timestamp, the author of the changes
@@ -42,14 +42,10 @@ type of object it is, and there are four different types of objects:
4242
along those lines.
4343

4444
Almost all of Git is built around manipulating this simple structure of four
45-
different object types. It is sort of it's own little filesystem that sits
46-
on top of your filesystem.
45+
different object types. It is sort of its own little filesystem that sits
46+
on top of your machine's filesystem.
4747

4848
### Different from SVN ###
4949

5050
It is important to note that this is very different from most SCM systems
51-
that you are probably used to. Subversion, CVS, Perforce, Mercurial and the like all
52-
use _Delta Storage_ systems - they store the differences between one commit
53-
and the next. Git does not do this - it stores a snapshot of what all the
54-
files in your project look like each time you commit in this tree structure. This
55-
is a very important concept to understand when using Git.
51+
that you may be familiar with. Subversion, CVS, Perforce, Mercurial and the like all use _Delta Storage_ systems - they store the differences between one commit and the next. Git does not do this - it stores a snapshot of what all the files in your project look like in this tree structure each time you commit. This is a very important concept to understand when using Git.

text/02_Git_Object_Db_Basics/1_Trees_and_Blobs.markdown

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ A blob generally stores the contents of a file.
55
[fig:object-blob]
66

77
You can use linkgit:git-show[1] to examine the contents of any blob.
8-
Assuming we have a SHA for a blob, we can examine its contents like this:
8+
Assuming we have the SHA for a blob, we can examine its contents like this:
99

1010
$ git show 6ff87c4664
1111

@@ -14,7 +14,7 @@ Assuming we have a SHA for a blob, we can examine its contents like this:
1414
v2.2 or v3.x or whatever), unless explicitly otherwise stated.
1515
...
1616

17-
A "blob" object is nothing but a binary blob of data. It doesn't refer
17+
A "blob" object is nothing but a chunk of binary data. It doesn't refer
1818
to anything else or have attributes of any kind, not even a file name.
1919

2020
Since the blob is entirely defined by its data, if two files in a
@@ -32,7 +32,7 @@ trees - it generally represents the contents of a directory or subdirectory.
3232

3333
The ever-versatile linkgit:git-show[1] command can also be used to
3434
examine tree objects, but linkgit:git-ls-tree[1] will give you more
35-
details. Assuming we have a SHA for a tree, we can examine it like this:
35+
details. Assuming we have the SHA for a tree, we can examine it like this:
3636

3737
$ git ls-tree fb3a8bdd0ce
3838
100644 blob 63c918c667fa005ff12ad89437f2fdc80926e21c .gitignore
@@ -49,9 +49,7 @@ As you can see, a tree object contains a list of entries, each with a
4949
mode, object type, SHA1 name, and name, sorted by name. It represents
5050
the contents of a single directory tree.
5151

52-
The object type may be a blob, representing the contents of a file, or
53-
another tree, representing the contents of a subdirectory. Since trees
54-
and blobs, like all other objects, are named by the SHA1 hash of their
52+
An object referenced by a tree may be blob, representing the contents of a file, or another tree, representing the contents of a subdirectory. Since trees and blobs, like all other objects, are named by the SHA1 hash of their
5553
contents, two trees have the same SHA1 name if and only if their
5654
contents (including, recursively, the contents of all subdirectories)
5755
are identical. This allows git to quickly determine the differences

text/02_Git_Object_Db_Basics/2_Commits.markdown

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ As you can see, a commit is defined by:
3434
- an **author**: The name of the person responsible for this change, together
3535
with its date.
3636
- a **committer**: The name of the person who actually created the commit,
37-
with the date it was done. This may be different from the author, for
38-
example, if the author was someone who wrote a patch and emailed it
39-
to the person who used it to create the commit.
37+
with the date it was done. This may be different from the author; for
38+
example, if the author wrote a patch and emailed it to another person who
39+
used the patch to create the commit.
4040
- a **comment** describing this commit.
4141

4242
Note that a commit does not itself contain any information about what
@@ -53,7 +53,7 @@ taken from the content currently stored in the index.
5353

5454
### The Object Model ###
5555

56-
So, now that we've looked at the 3 main object types (the blob, tree and commit),
56+
So, now that we've looked at the 3 main object types (blob, tree and commit),
5757
let's take a quick look at how they all fit together.
5858

5959
If we had a simple project with the following directory structure:

text/02_Git_Object_Db_Basics/3_Trust_and_Tags.markdown

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33

44
[fig:object-tag]
55

6-
A tag object contains an object, object type, tag name, the name of the
7-
person ("tagger") who created the tag, and a message, which may contain
8-
a signature, as can be seen using linkgit:git-cat-file[1]:
6+
A tag object contains an object name (called simply 'object'), object type, tag name, the name of the person ("tagger") who created the tag, and a message, which may contain a signature, as can be seen using linkgit:git-cat-file[1]:
97

108
$ git cat-file tag v1.5.0
119
object 437b1b20df4b356c9342dac8d38849f24ef44f27

text/02a_Git_Directory_and_Working_Directory/0_ Git_Directory_and_Working_Directory.markdown

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,9 @@
22

33
### The Git Directory ###
44

5-
The 'git directory' is the directory that stores all the Git meta information
6-
about your project - including all of the objects (commits, trees, blobs, tags),
7-
all of the pointers to where different branches are and more.
5+
The 'git directory' is the directory that stores all Git's history and meta information for your project - including all of the objects (commits, trees, blobs, tags), all of the pointers to where different branches are and more.
86

9-
There is only one Git Directory per project (as opposed to one per subdirectory like SVN or CVS),
10-
and that directory is (by default, though not neccesarily) found in the '.git'
11-
directory in the root of your project. If you look at the contents of that
12-
directory, you can see all of our important files:
7+
There is only one Git Directory per project (as opposed to one per subdirectory like with SVN or CVS), and that directory is (by default, though not necessarily) '.git' in the root of your project. If you look at the contents of that directory, you can see all of your important files:
138

149
$>tree -L 1
1510
.
@@ -29,6 +24,6 @@ directory, you can see all of our important files:
2924
The Git 'working directory' is the directory that holds the current checkout
3025
of the files you are working on. Files in this directory are often removed
3126
or replaced by Git as you switch branches - this is normal. All your history
32-
is stored in the Git Directory, the working directory is simply a temporary
27+
is stored in the Git Directory; the working directory is simply a temporary
3328
checkout place where you can modify the files until your next commit.
3429

text/03_The_Git_Index/0_ The_Git_Index.markdown

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
The Git index is used as a staging area between your working directory
44
and your repository. You can use the index to build up a set of changes
5-
that you want to commit together relatively easily. When you create a commit,
6-
what is committed is what is currently in the index, not what is in your working
5+
that you want to commit together. When you create a commit, what is committed is what is currently in the index, not what is in your working
76
directory.
87

98
### Looking at the Index ###
109

1110
The easiest way to see what is in the index is with the linkgit:git-status[1]
12-
command. When you run the status, you can see what files are staged (currently in your index),
11+
command. When you run git status, you can see which files are staged (currently in your index),
1312
which are modified but not yet staged, and which are completely untracked.
1413

1514
$>git status
@@ -40,5 +39,5 @@ information as long as you have the name of the tree that it described.
4039
And with that, you should have a pretty good understanding of the basics of
4140
what Git is doing behind the scenes, and why it is a bit different than most
4241
other SCM systems. Don't worry if you don't totally understand it all right
43-
now, we'll revisit all of these topics in the next sections. Now we're ready
42+
now; we'll revisit all of these topics in the next sections. Now we're ready
4443
to move on to installing, configuring and using Git.

0 commit comments

Comments
 (0)