Skip to content

Commit 182a57e

Browse files
authored
Merge pull request #845 from rpjday/ch1_grammar
Minor grammar/font/NOTE/clarification tweaks to Chapter 1.
2 parents ac32fef + 7498276 commit 182a57e

File tree

6 files changed

+27
-15
lines changed

6 files changed

+27
-15
lines changed

book/01-introduction/sections/basics.asc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ We'll explore some of the benefits you gain by thinking of your data this way wh
3030

3131
==== Nearly Every Operation Is Local
3232

33-
Most operations in Git only need local files and resources to operate – generally no information is needed from another computer on your network.
33+
Most operations in Git need only local files and resources to operate – generally no information is needed from another computer on your network.
3434
If you're used to a CVCS where most operations have that network latency overhead, this aspect of Git will make you think that the gods of speed have blessed Git with unworldly powers.
3535
Because you have the entire history of the project right there on your local disk, most operations seem almost instantaneous.
3636

@@ -39,7 +39,7 @@ This means you see the project history almost instantly.
3939
If you want to see the changes introduced between the current version of a file and the file a month ago, Git can look up the file a month ago and do a local difference calculation, instead of having to either ask a remote server to do it or pull an older version of the file from the remote server to do it locally.
4040

4141
This also means that there is very little you can't do if you're offline or off VPN.
42-
If you get on an airplane or a train and want to do a little work, you can commit happily until you get to a network connection to upload.
42+
If you get on an airplane or a train and want to do a little work, you can commit happily (to your _local_ copy, remember?) until you get to a network connection to upload.
4343
If you go home and can't get your VPN client working properly, you can still work.
4444
In many other systems, doing so is either impossible or painful.
4545
In Perforce, for example, you can't do much when you aren't connected to the server; and in Subversion and CVS, you can edit files, but you can't commit changes to your database (because your database is offline).
@@ -66,7 +66,7 @@ In fact, Git stores everything in its database not by file name but by the hash
6666

6767
==== Git Generally Only Adds Data
6868

69-
When you do actions in Git, nearly all of them only add data to the Git database.
69+
When you do actions in Git, nearly all of them only _add_ data to the Git database.
7070
It is hard to get the system to do anything that is not undoable or to make it erase data in any way.
7171
As in any VCS, you can lose or mess up changes you haven't committed yet; but after you commit a snapshot into Git, it is very difficult to lose, especially if you regularly push your database to another repository.
7272

@@ -88,18 +88,18 @@ This leads us to the three main sections of a Git project: the Git directory, th
8888
image::images/areas.png["Working tree, staging area, and Git directory."]
8989

9090
The Git directory is where Git stores the metadata and object database for your project.
91-
This is the most important part of Git, and it is what is copied when you clone a repository from another computer.
91+
This is the most important part of Git, and it is what is copied when you _clone_ a repository from another computer.
9292

9393
The working tree is a single checkout of one version of the project.
9494
These files are pulled out of the compressed database in the Git directory and placed on disk for you to use or modify.
9595

9696
The staging area is a file, generally contained in your Git directory, that stores information about what will go into your next commit.
97-
It's sometimes referred to as the ``index'', but it's also common to refer to it as the staging area.
97+
Its technical name in Git parlance is the ``index'', but the phrase ``staging area'' works just as well.
9898

9999
The basic Git workflow goes something like this:
100100

101101
1. You modify files in your working tree.
102-
2. You stage the files, adding snapshots of them to your staging area.
102+
2. You selectively stage just those changes you want to be part of your next commit, which adds _only_ those changes to the staging area.
103103
3. You do a commit, which takes the files as they are in the staging area and stores that snapshot permanently to your Git directory.
104104

105105
If a particular version of a file is in the Git directory, it's considered committed.

book/01-introduction/sections/command-line.asc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
=== The Command Line
22

33
There are a lot of different ways to use Git.
4-
There are the original command line tools, and there are many graphical user interfaces of varying capabilities.
4+
There are the original command-line tools, and there are many graphical user interfaces of varying capabilities.
55
For this book, we will be using Git on the command line.
6-
For one, the command line is the only place you can run *all* Git commands – most of the GUIs only implement some subset of Git functionality for simplicity.
7-
If you know how to run the command line version, you can probably also figure out how to run the GUI version, while the opposite is not necessarily true.
6+
For one, the command line is the only place you can run _all_ Git commands – most of the GUIs implement only a partial subset of Git functionality for simplicity.
7+
If you know how to run the command-line version, you can probably also figure out how to run the GUI version, while the opposite is not necessarily true.
88
Also, while your choice of graphical client is a matter of personal taste, _all_ users will have the command-line tools installed and available.
99

1010
So we will expect you to know how to open Terminal in Mac or Command Prompt or Powershell in Windows.

book/01-introduction/sections/first-time-setup.asc

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ You can also change them at any time by running through the commands again.
88
Git comes with a tool called `git config` that lets you get and set configuration variables that control all aspects of how Git looks and operates.(((git commands, config)))
99
These variables can be stored in three different places:
1010

11-
1. `/etc/gitconfig` file: Contains values for every user on the system and all their repositories.
11+
1. `/etc/gitconfig` file: Contains values applied to every user on the system and all their repositories.
1212
If you pass the option `--system` to `git config`, it reads and writes from this file specifically.
13-
2. `~/.gitconfig` or `~/.config/git/config` file: Specific to your user.
13+
2. `~/.gitconfig` or `~/.config/git/config` file: Values specific personally to you, the user.
1414
You can make Git read and write to this file specifically by passing the `--global` option.
1515
3. `config` file in the Git directory (that is, `.git/config`) of whatever repository you're currently using: Specific to that single repository.
1616

@@ -82,7 +82,7 @@ An example on a Windows system may include a prematurely terminated Git operatio
8282

8383
==== Checking Your Settings
8484

85-
If you want to check your settings, you can use the `git config --list` command to list all the settings Git can find at that point:
85+
If you want to check your configuration settings, you can use the `git config --list` command to list all the settings Git can find at that point:
8686

8787
[source,console]
8888
----
@@ -106,3 +106,15 @@ You can also check what Git thinks a specific key's value is by typing `git conf
106106
$ git config user.name
107107
John Doe
108108
----
109+
110+
[NOTE]
111+
====
112+
Since Git might read the same configuration variable value from more than one file, it's possible that you have an unexpected value for one of these values and you don't know why.
113+
In cases like that, you can query Git as to the _origin_ for that value, and it will tell you which configuration file had the final say in setting that value:
114+
115+
[source,console]
116+
----
117+
$ git config --show-origin rerere.autoUpdate
118+
file:/home/johndoe/.gitconfig false
119+
----
120+
====

book/01-introduction/sections/help.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ $ git <verb> --help
1010
$ man git-<verb>
1111
----
1212

13-
For example, you can get the manpage help for the config command by running(((git commands, help)))
13+
For example, you can get the manpage help for the `git config` command by running(((git commands, help)))
1414

1515
[source,console]
1616
----

book/01-introduction/sections/history.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ Some of the goals of the new system were as follows:
1717
* Able to handle large projects like the Linux kernel efficiently (speed and data size)
1818
1919
Since its birth in 2005, Git has evolved and matured to be easy to use and yet retain these initial qualities.
20-
It's incredibly fast, it's very efficient with large projects, and it has an incredible branching system for non-linear development (See <<_git_branching>>).
20+
It's amazingly fast, it's very efficient with large projects, and it has an incredible branching system for non-linear development (See <<_git_branching>>).

book/01-introduction/sections/installing.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Since Git is quite excellent at preserving backwards compatibility, any version
1515

1616
(((Linux, installing)))
1717
If you want to install the basic Git tools on Linux via a binary installer, you can generally do so through the basic package-management tool that comes with your distribution.
18-
If you're on Fedora for example, you can use `dnf`:
18+
If you're on Fedora for example (or any closely-related RPM-based distro such as RHEL or CentOS), you can use `dnf`:
1919

2020
[source,console]
2121
----

0 commit comments

Comments
 (0)