Skip to content

Commit bad9e21

Browse files
committed
more backported errata
1 parent e23cb1c commit bad9e21

File tree

8 files changed

+26
-15
lines changed

8 files changed

+26
-15
lines changed

book/02-git-basics/sections/recording-changes.asc

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,25 @@ You can also use two asterisks to match nested directories; `a/**/z` would match
214214

215215
Here is another example .gitignore file:
216216

217-
[source,console]
217+
[source]
218218
----
219-
# a comment - this is ignored
220-
*.a # no .a files
221-
!lib.a # but do track lib.a, even though you're ignoring .a files above
222-
/TODO # only ignore the root TODO file, not subdir/TODO
223-
build/ # ignore all files in the build/ directory
224-
doc/*.txt # ignore doc/notes.txt, but not doc/server/arch.txt
219+
# no .a files
220+
*.a
221+
222+
# but do track lib.a, even though you're ignoring .a files above
223+
!lib.a
224+
225+
# only ignore the root TODO file, not subdir/TODO
226+
/TODO
227+
228+
# ignore all files in the build/ directory
229+
build/
230+
231+
# ignore doc/notes.txt, but not doc/server/arch.txt
232+
doc/*.txt
233+
234+
# ignore all .txt files in the doc/ directory
235+
doc/**/*.txt
225236
----
226237

227238
[TIP]
@@ -493,7 +504,7 @@ This is a safety feature to prevent accidental removal of data that hasn't yet b
493504

494505
Another useful thing you may want to do is to keep the file in your working tree but remove it from your staging area.
495506
In other words, you may want to keep the file on your hard drive but not have Git track it anymore.
496-
This is particularly useful if you forgot to add something to your `.gitignore` file and accidentally added it, like a large log file or a bunch of `.a` compiled files.
507+
This is particularly useful if you forgot to add something to your `.gitignore` file and accidentally staged it, like a large log file or a bunch of `.a` compiled files.
497508
To do this, use the `--cached` option:
498509

499510
[source,console]

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Name this remote `teamone`, which will be your shortname for that whole URL.
4545
image::images/remote-branches-4.png[Adding another server as a remote.]
4646

4747
Now, you can run `git fetch teamone` to fetch everything the remote `teamone` server has that you don't have yet.
48-
Because that server is a subset of the data your `origin` server has right now, Git fetches no data but sets a remote branch called `teamone/master` to point to the commit that `teamone` has as its `master` branch.
48+
Because that server has a subset of the data your `origin` server has right now, Git fetches no data but sets a remote branch called `teamone/master` to point to the commit that `teamone` has as its `master` branch.
4949

5050
.Remote tracking branch for `teamone/master`
5151
image::images/remote-branches-5.png[Remote tracking branch for `teamone/master`.]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ To clone a Git repository over SSH, you can specify ssh:// URL like this:
142142

143143
[source,console]
144144
----
145-
$ git clone ssh://user@server:project.git
145+
$ git clone ssh://user@server/project.git
146146
----
147147

148-
Or you can not specify a protocol – Git assumes SSH if you aren't explicit:
148+
Or you can use the shorter scp-like syntax for the SSH protocol:
149149

150150
[source,console]
151151
----

book/04-git-server/sections/setting-up-server.asc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ At this point, the others can clone it down and push changes back up just as eas
7171
[source,console]
7272
----
7373
$ git clone git@gitserver:/opt/git/project.git
74+
$ cd project
7475
$ vim README
7576
$ git commit -am 'fix for the README file'
7677
$ git push origin master

book/08-customizing-git/sections/attributes.asc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ Now, Git won't try to convert or fix CRLF issues; nor will it try to compute or
3636
You can also use the Git attributes functionality to effectively diff binary files.
3737
You do this by telling Git how to convert your binary data to a text format that can be compared via the normal diff.
3838

39-
Because this is a pretty cool and not widely known feature, we'll go over a few examples.
4039
First, you'll use this technique to solve one of the most annoying problems known to humanity: version-controlling Microsoft Word documents.
4140
Everyone knows that Word is the most horrific editor around, but oddly, everyone still uses it.
4241
If you want to version-control Word documents, you can stick them in a Git repository and commit every once in a while; but what good does that do?

book/08-customizing-git/sections/config.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ So, you can either run four config commands
282282
----
283283
$ git config --global merge.tool extMerge
284284
$ git config --global mergetool.extMerge.cmd \
285-
'extMerge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"'
285+
'extMerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\"'
286286
$ git config --global mergetool.extMerge.trustExitCode false
287287
$ git config --global diff.external extDiff
288288
----

book/10-git-internals/sections/maintenance.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ You can easily see what commits modified this file:
277277

278278
[source,console]
279279
----
280-
$ git log --oneline -- git.tgz
280+
$ git log --oneline --branches -- git.tgz
281281
dadf725 oops - removed large tarball
282282
7b30847 add git tarball
283283
----

book/10-git-internals/sections/objects.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ image::images/data-model-1.png[Simple version of the Git data model.]
149149
You can fairly easily create your own tree.
150150
Git normally creates a tree by taking the state of your staging area or index and writing a series of tree objects from it.
151151
So, to create a tree object, you first have to set up an index by staging some files.
152-
To create an index with a single entry – the first version of your text.txt file – you can use the plumbing command `update-index`.
152+
To create an index with a single entry – the first version of your test.txt file – you can use the plumbing command `update-index`.
153153
You use this command to artificially add the earlier version of the test.txt file to a new staging area.
154154
You must pass it the `--add` option because the file doesn't yet exist in your staging area (you don't even have a staging area set up yet) and `--cacheinfo` because the file you're adding isn't in your directory but is in your database.
155155
Then, you specify the mode, SHA-1, and filename:

0 commit comments

Comments
 (0)