Skip to content

Commit 0e20606

Browse files
committed
new lines
1 parent 8d62004 commit 0e20606

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+729
-301
lines changed

README.asc

+9-4
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,24 @@ You can find this book online at: http://git-scm.com/book
66

77
Like the first edition, the second edition of Pro Git is open source under a Creative Commons license.
88

9-
A couple of things have changed since open sourcing the first edition. For one, we've moved from Markdown to the amazing Asciidoc format for the text of the book. We've also moved to using O'Reilly's https://atlas.oreilly.com[Atlas platform] for generating continuous builds of the book so all major formats are always available in every language.
9+
A couple of things have changed since open sourcing the first edition.
10+
For one, we've moved from Markdown to the amazing Asciidoc format for the text of the book.
11+
We've also moved to using O'Reilly's https://atlas.oreilly.com[Atlas platform] for generating continuous builds of the book so all major formats are always available in every language.
1012

11-
We've also moved to keeping the translations in separate repositories rather than subdirectories of the English repository. See link:CONTRIBUTING.md[the Contributing document] for more information.
13+
We've also moved to keeping the translations in separate repositories rather than subdirectories of the English repository.
14+
See link:CONTRIBUTING.md[the Contributing document] for more information.
1215

1316
== How To Generate the Book
1417

1518
There are two ways to generate e-book content from this source code.
1619

17-
The easiest way is simply to let us do it. A robot is standing by to look for new work on the main branch and automatically build it for everyone.
20+
The easiest way is simply to let us do it.
21+
A robot is standing by to look for new work on the main branch and automatically build it for everyone.
1822

1923
You can find the current builds on http://git-scm.com/book[] and more information about the builds available at https://progit.org[].
2024

21-
The other way to generate e-book files is to do so manually with Asciidoctor. If you run the following you _may_ actually get HTML, Epub, Mobi and PDF output files:
25+
The other way to generate e-book files is to do so manually with Asciidoctor.
26+
If you run the following you _may_ actually get HTML, Epub, Mobi and PDF output files:
2227

2328
----
2429
$ bundle install

TRANSLATION_NOTES.asc

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
== Translation Notes
22

3-
After forking this repository to translate the work, this file is where the notes for coordinating the translation work would go. Things like standardizing on words and expressions so that the work is consistent or notes on how the contributing process is to be handled.
3+
After forking this repository to translate the work, this file is where the notes for coordinating the translation work would go.
4+
Things like standardizing on words and expressions so that the work is consistent or notes on how the contributing process is to be handled.
45

56
As a translation maintainer, also feel free to modify or completely rewrite the README file to contain instructions specific to your translation.
67

78
=== Translation Status
89

9-
As the work is translated, please update the `status.json` file to indicate the rough percentage complete each file is. This will be shown on various pages to let people know how much work is left to be done.
10+
As the work is translated, please update the `status.json` file to indicate the rough percentage complete each file is.
11+
This will be shown on various pages to let people know how much work is left to be done.

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ $ git config --global core.editor emacs
4848

4949
[WARNING]
5050
====
51-
Vim and Emacs are popular text editors often used by developers on Unix based systems like Linux and Mac. If you are not familiar with either of these editors or are on a Windows system, you may need to search for instructions for how to set up your favorite editor with Git.
51+
Vim and Emacs are popular text editors often used by developers on Unix based systems like Linux and Mac.
52+
If you are not familiar with either of these editors or are on a Windows system, you may need to search for instructions for how to set up your favorite editor with Git.
5253
If you don't set an editor like this and you don't know what Vim or Emacs are, you will likely get into a really confusing state when they are launched.
5354
====
5455

book/01-introduction/sections/installing.asc

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ You can either install it as a package or via another installer, or download the
66

77
[NOTE]
88
====
9-
This book was written using Git version *2.0.0*. Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently if you're using an older version. Since Git is quite excellent at preserving backwards compatibility, any version after 2.0 should work just fine.
9+
This book was written using Git version *2.0.0*.
10+
Though most of the commands we use should work even in ancient versions of Git, some of them might not or might act slightly differently if you're using an older version.
11+
Since Git is quite excellent at preserving backwards compatibility, any version after 2.0 should work just fine.
1012
====
1113

1214
==== Installing on Linux

book/02-git-basics/sections/remotes.asc

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ origin [email protected]:mojombo/grit.git (fetch)
5656
origin [email protected]:mojombo/grit.git (push)
5757
----
5858

59-
This means we can pull contributions from any of these users pretty easily. We may additionally have permission to push to one or more of these, though we can't tell that here.
59+
This means we can pull contributions from any of these users pretty easily.
60+
We may additionally have permission to push to one or more of these, though we can't tell that here.
6061

6162
Notice that these remotes use a variety of protocols; we'll cover more about this in <<_git_on_the_server>>.
6263

book/02-git-basics/sections/undoing.asc

+6-3
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,12 @@ The `CONTRIBUTING.md` file is modified but once again unstaged.
7979

8080
[NOTE]
8181
=====
82-
While `git reset` _can_ be a dangerous command if you call it with `--hard`, in this instance the file in your working directory is not touched. Calling `git reset` without an option is not dangerous - it only touches your staging area.
82+
While `git reset` _can_ be a dangerous command if you call it with `--hard`, in this instance the file in your working directory is not touched.
83+
Calling `git reset` without an option is not dangerous - it only touches your staging area.
8384
=====
8485

85-
For now this magic invocation is all you need to know about the `git reset` command. We'll go into much more detail about what `reset` does and how to master it to do really interesting things in <<_git_reset>>.
86+
For now this magic invocation is all you need to know about the `git reset` command.
87+
We'll go into much more detail about what `reset` does and how to master it to do really interesting things in <<_git_reset>>.
8688

8789
==== Unmodifying a Modified File
8890

@@ -119,7 +121,8 @@ You can see that the changes have been reverted.
119121

120122
[IMPORTANT]
121123
=====
122-
It's important to understand that `git checkout -- [file]` is a dangerous command. Any changes you made to that file are gone – you just copied another file over it.
124+
It's important to understand that `git checkout -- [file]` is a dangerous command.
125+
Any changes you made to that file are gone – you just copied another file over it.
123126
Don't ever use this command unless you absolutely know that you don't want the file.
124127
=====
125128

book/02-git-basics/sections/viewing-history.asc

+2-1
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,8 @@ You can also filter the list to commits that match some search criteria.
245245
The `--author` option allows you to filter on a specific author, and the `--grep` option lets you search for keywords in the commit messages.
246246
(Note that if you want to specify both author and grep options, you have to add `--all-match` or the command will match commits with either.)
247247

248-
Another really helpful filter is the `-S` option which takes a string and only shows the commits that introduced a change to the code that added or removed that string. For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call:
248+
Another really helpful filter is the `-S` option which takes a string and only shows the commits that introduced a change to the code that added or removed that string.
249+
For instance, if you wanted to find the last commit that added or removed a reference to a specific function, you could call:
249250

250251
[source,console]
251252
----

book/03-git-branching/sections/nutshell.asc

+2-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ The `git branch` command only _created_ a new branch – it didn't switch to tha
7474
.HEAD pointing to a branch
7575
image::images/head-to-master.png[HEAD pointing to a branch.]
7676

77-
You can easily see this by running a simple `git log` command that shows you where the branch pointers are pointing. This option is called `--decorate`.
77+
You can easily see this by running a simple `git log` command that shows you where the branch pointers are pointing.
78+
This option is called `--decorate`.
7879

7980
[source,console]
8081
----

book/03-git-branching/sections/rebasing.asc

+8-4
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ It's pretty safe to assume that the other developer doesn't want `C4` and `C6` t
179179
[[_rebase_rebase]]
180180
==== Rebase When You Rebase
181181

182-
If you *do* find yourself in a situation like this, Git has some further magic that might help you out. If someone on your team force pushes changes that overwrite work that you've based work on, your challenge is to figure out what is yours and what they've rewritten.
182+
If you *do* find yourself in a situation like this, Git has some further magic that might help you out.
183+
If someone on your team force pushes changes that overwrite work that you've based work on, your challenge is to figure out what is yours and what they've rewritten.
183184

184-
It turns out that in addition to the commit SHA-1 checksum, Git also calculates a checksum that is based just on the patch introduced with the commit. This is called a ``patch-id''.
185+
It turns out that in addition to the commit SHA-1 checksum, Git also calculates a checksum that is based just on the patch introduced with the commit.
186+
This is called a ``patch-id''.
185187

186188
If you pull down work that was rewritten and rebase it on top of the new commits from your partner, Git can often successfully figure out what is uniquely yours and apply them back on top of the new branch.
187189

@@ -198,9 +200,11 @@ So instead of the result we see in <<_merge_rebase_work>>, we would end up with
198200
.Rebase on top of force-pushed rebase work.
199201
image::images/perils-of-rebasing-5.png[Rebase on top of force-pushed rebase work.]
200202

201-
This only works if C4 and C4' that your partner made are almost exactly the same patch. Otherwise the rebase won't be able to tell that it's a duplicate and will add another C4-like patch (which will probably fail to apply cleanly, since the changes would already be at least somewhat there).
203+
This only works if C4 and C4' that your partner made are almost exactly the same patch.
204+
Otherwise the rebase won't be able to tell that it's a duplicate and will add another C4-like patch (which will probably fail to apply cleanly, since the changes would already be at least somewhat there).
202205

203-
You can also simplify this by running a `git pull --rebase` instead of a normal `git pull`. Or you could do it manually with a `git fetch` followed by a `git rebase teamone/master` in this case.
206+
You can also simplify this by running a `git pull --rebase` instead of a normal `git pull`.
207+
Or you could do it manually with a `git fetch` followed by a `git rebase teamone/master` in this case.
204208

205209
If you are using `git pull` and want to make `--rebase` the default, you can set the `pull.rebase` config value with something like `git config --global pull.rebase true`.
206210

book/03-git-branching/sections/remote-branches.asc

+21-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ Git also gives you your own local `master` branch starting at the same place as
2222
[NOTE]
2323
.``origin'' is not special
2424
====
25-
Just like the branch name ``master'' does not have any special meaning in Git, neither does ``origin''. While ``master'' is the default name for a starting branch when you run `git init` which is the only reason it's widely used, ``origin'' is the default name for a remote when you run `git clone`. If you run `git clone -o booyah` instead, then you will have `booyah/master` as your default remote branch.(((origin)))
25+
Just like the branch name ``master'' does not have any special meaning in Git, neither does ``origin''.
26+
While ``master'' is the default name for a starting branch when you run `git init` which is the only reason it's widely used, ``origin'' is the default name for a remote when you run `git clone`.
27+
If you run `git clone -o booyah` instead, then you will have `booyah/master` as your default remote branch.(((origin)))
2628
====
2729

2830
.Server and local repositories after cloning
@@ -87,9 +89,11 @@ If you didn't want it to be called `serverfix` on the remote, you could instead
8789
[NOTE]
8890
.Don't type your password every time
8991
====
90-
If you're using an HTTPS URL to push over, the Git server will ask you for your username and password for authentication. By default it will prompt you on the terminal for this information so the server can tell if you're allowed to push.
92+
If you're using an HTTPS URL to push over, the Git server will ask you for your username and password for authentication.
93+
By default it will prompt you on the terminal for this information so the server can tell if you're allowed to push.
9194
92-
If you don't want to type it every single time you push, you can set up a ``credential cache''. The simplest is just to keep it in memory for a few minutes, which you can easily set up by running `git config --global credential.helper cache`.
95+
If you don't want to type it every single time you push, you can set up a ``credential cache''.
96+
The simplest is just to keep it in memory for a few minutes, which you can easily set up by running `git config --global credential.helper cache`.
9397
9498
For more information on the various credential caching options available, see <<_credential_caching>>.
9599
====
@@ -164,10 +168,12 @@ Branch serverfix set up to track remote branch serverfix from origin.
164168
[NOTE]
165169
.Upstream shorthand
166170
====
167-
When you have a tracking branch set up, you can reference it with the `@{upstream}` or `@{u}` shorthand. So if you're on the `master` branch and it's tracking `origin/master`, you can say something like `git merge @{u}` instead of `git merge origin/master` if you wish.(((+++@{u}+++)))(((+++@{upstream}+++)))
171+
When you have a tracking branch set up, you can reference it with the `@{upstream}` or `@{u}` shorthand.
172+
So if you're on the `master` branch and it's tracking `origin/master`, you can say something like `git merge @{u}` instead of `git merge origin/master` if you wish.(((+++@{u}+++)))(((+++@{upstream}+++)))
168173
====
169174

170-
If you want to see what tracking branches you have set up, you can use the `-vv` option to `git branch`. This will list out your local branches with more information including what each branch is tracking and if your local branch is ahead, behind or both.
175+
If you want to see what tracking branches you have set up, you can use the `-vv` option to `git branch`.
176+
This will list out your local branches with more information including what each branch is tracking and if your local branch is ahead, behind or both.
171177

172178
[source,console]
173179
----
@@ -178,9 +184,15 @@ $ git branch -vv
178184
testing 5ea463a trying something new
179185
----
180186

181-
So here we can see that our `iss53` branch is tracking `origin/iss53` and is ``ahead'' by two, meaning that we have two commits locally that are not pushed to the server. We can also see that our `master` branch is tracking `origin/master` and is up to date. Next we can see that our `serverfix` branch is tracking the `server-fix-good` branch on our `teamone` server and is ahead by three and behind by one, meaning that there is one commit on the server we haven't merged in yet and three commits locally that we haven't pushed. Finally we can see that our `testing` branch is not tracking any remote branch.
187+
So here we can see that our `iss53` branch is tracking `origin/iss53` and is ``ahead'' by two, meaning that we have two commits locally that are not pushed to the server.
188+
We can also see that our `master` branch is tracking `origin/master` and is up to date.
189+
Next we can see that our `serverfix` branch is tracking the `server-fix-good` branch on our `teamone` server and is ahead by three and behind by one, meaning that there is one commit on the server we haven't merged in yet and three commits locally that we haven't pushed.
190+
Finally we can see that our `testing` branch is not tracking any remote branch.
182191

183-
It's important to note that these numbers are only since the last time you fetched from each server. This command does not reach out to the servers, it's telling you about what it has cached from these servers locally. If you want totally up to date ahead and behind numbers, you'll need to fetch from all your remotes right before running this. You could do that like this: `$ git fetch --all; git branch -vv`
192+
It's important to note that these numbers are only since the last time you fetched from each server.
193+
This command does not reach out to the servers, it's telling you about what it has cached from these servers locally.
194+
If you want totally up to date ahead and behind numbers, you'll need to fetch from all your remotes right before running this.
195+
You could do that like this: `$ git fetch --all; git branch -vv`
184196

185197
==== Pulling
186198

@@ -207,4 +219,5 @@ To https://github.com/schacon/simplegit
207219
- [deleted] serverfix
208220
----
209221

210-
Basically all this does is remove the pointer from the server. The Git server will generally keep the data there for a while until a garbage collection runs, so if it was accidentally deleted, it's often easy to recover.
222+
Basically all this does is remove the pointer from the server.
223+
The Git server will generally keep the data there for a while until a garbage collection runs, so if it was accidentally deleted, it's often easy to recover.

book/04-git-server/sections/git-daemon.asc

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
=== Git Daemon
22

33
(((serving repositories, git protocol)))
4-
Next we'll set up a daemon serving repositories over the ``Git'' protocol. This is common choice for fast, unauthenticated access to your Git data. Remember that since it's not an authenticated service, anything you serve over this protocol is public within its network.
4+
Next we'll set up a daemon serving repositories over the ``Git'' protocol.
5+
This is common choice for fast, unauthenticated access to your Git data.
6+
Remember that since it's not an authenticated service, anything you serve over this protocol is public within its network.
57

68
If you're running this on a server outside your firewall, it should only be used for projects that are publicly visible to the world.
79
If the server you're running it on is inside your firewall, you might use it for projects that a large number of people or computers (continuous integration or build servers) have read-only access to, when you don't want to have to add an SSH key for each.
@@ -53,7 +55,8 @@ initctl start local-git-daemon
5355

5456
On other systems, you may want to use `xinetd`, a script in your `sysvinit` system, or something else – as long as you get that command daemonized and watched somehow.
5557

56-
Next, you have to tell Git which repositories to allow unauthenticated Git server-based access to. You can do this in each repository by creating a file named `git-daemon-export-ok`.
58+
Next, you have to tell Git which repositories to allow unauthenticated Git server-based access to.
59+
You can do this in each repository by creating a file named `git-daemon-export-ok`.
5760

5861
[source,console]
5962
----

0 commit comments

Comments
 (0)