Skip to content

Commit 5bab49d

Browse files
authored
Merge pull request #78 from max123kl/Chapter-7-8
Chapter 7.8 + Update from English Repo
2 parents 40dfb3e + 311e462 commit 5bab49d

32 files changed

+529
-505
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ commit 66938dae3329c7aebe598c2246a8e6af90d04646
5353
Author: Josh Goebel <[email protected]>
5454
Date: Tue Aug 26 19:48:51 2008 +0800
5555
56-
test for current head
56+
Test for current head
5757
5858
Signed-off-by: Scott Chacon <[email protected]>
5959
----

book/02-git-basics/sections/getting-a-repository.asc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Mit dem Befehl `git add` legen Sie fest, welche Dateien versioniert werden solle
4747
----
4848
$ git add *.c
4949
$ git add LICENSE
50-
$ git commit -m 'initial project version'
50+
$ git commit -m 'Initial project version'
5151
----
5252

5353
Wir werden gleich noch einmal genauer auf diese Befehle eingehen.

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,8 @@ Alternativ können Sie Ihre Commit-Nachricht auch inline mit dem Befehl `commit
461461

462462
[source,console]
463463
----
464-
$ git commit -m "Story 182: Fix benchmarks for speed"
465-
[master 463dc4f] Story 182: Fix benchmarks for speed
464+
$ git commit -m "Story 182: fix benchmarks for speed"
465+
[master 463dc4f] Story 182: fix benchmarks for speed
466466
2 files changed, 2 insertions(+)
467467
create mode 100644 README
468468
----
@@ -493,8 +493,8 @@ Changes not staged for commit:
493493
modified: CONTRIBUTING.md
494494
495495
no changes added to commit (use "git add" and/or "git commit -a")
496-
$ git commit -a -m 'added new benchmarks'
497-
[master 83e38c7] added new benchmarks
496+
$ git commit -a -m 'Add new benchmarks'
497+
[master 83e38c7] Add new benchmarks
498498
1 file changed, 5 insertions(+), 0 deletions(-)
499499
----
500500

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
9191
Author: Scott Chacon <[email protected]>
9292
Date: Mon Mar 17 21:52:11 2008 -0700
9393
94-
changed the version number
94+
Change version number
9595
----
9696

9797
Das zeigt die Tagger-Informationen, das Datum, an dem der Commit getaggt wurde, und die Annotationsmeldung an, bevor die Commit-Informationen angezeigt werden.
@@ -124,7 +124,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
124124
Author: Scott Chacon <[email protected]>
125125
Date: Mon Mar 17 21:52:11 2008 -0700
126126
127-
changed the version number
127+
Change version number
128128
----
129129

130130
==== Nachträgliches Tagging
@@ -136,18 +136,18 @@ Angenommen, Ihr Commit-Verlauf sieht so aus:
136136
----
137137
$ git log --pretty=oneline
138138
15027957951b64cf874c3557a0f3547bd83b3ff6 Merge branch 'experiment'
139-
a6b4c97498bd301d84096da251c98a07c7723e65 beginning write support
140-
0d52aaab4479697da7686c15f77a3d64d9165190 one more thing
139+
a6b4c97498bd301d84096da251c98a07c7723e65 Create write support
140+
0d52aaab4479697da7686c15f77a3d64d9165190 One more thing
141141
6d52a271eda8725415634dd79daabbc4d9b6008e Merge branch 'experiment'
142-
0b7434d86859cc7b8c3d5e1dddfed66ff742fcbc added a commit function
143-
4682c3261057305bdd616e23b64b0857d832627b added a todo file
144-
166ae0c4d3f420721acbb115cc33848dfcc2121a started write support
145-
9fceb02d0ae598e95dc970b74767f19372d61af8 updated rakefile
146-
964f16d36dfccde844893cac5b347e7b3d44abbc commit the todo
147-
8a5cbc430f1a9c3d00faaeffd07798508422908a updated readme
142+
0b7434d86859cc7b8c3d5e1dddfed66ff742fcbc Add commit function
143+
4682c3261057305bdd616e23b64b0857d832627b Add todo file
144+
166ae0c4d3f420721acbb115cc33848dfcc2121a Create write support
145+
9fceb02d0ae598e95dc970b74767f19372d61af8 Update rakefile
146+
964f16d36dfccde844893cac5b347e7b3d44abbc Commit the todo
147+
8a5cbc430f1a9c3d00faaeffd07798508422908a Update readme
148148
----
149149

150-
Nehmen wir an, Sie haben vergessen, das Projekt mit v1.2 zu markieren, das bei dem Commit von „updated rakefile“ vorlag.
150+
Nehmen wir an, Sie haben vergessen, das Projekt mit v1.2 zu markieren, das bei dem Commit von „Update rakefile“ vorlag.
151151
Sie können ihn nachträglich hinzufügen.
152152
Um diesen Commit zu markieren, geben Sie am Ende des Befehls die Commit-Prüfsumme (oder einen Teil davon) an:
153153

@@ -178,7 +178,7 @@ commit 9fceb02d0ae598e95dc970b74767f19372d61af8
178178
Author: Magnus Chacon <[email protected]>
179179
Date: Sun Apr 27 20:43:35 2008 -0700
180180
181-
updated rakefile
181+
Update rakefile
182182
...
183183
----
184184

@@ -277,7 +277,7 @@ HEAD is now at 99ada87... Merge pull request #89 from schacon/appendix-final
277277
278278
$ git checkout 2.0-beta-0.1
279279
Previous HEAD position was 99ada87... Merge pull request #89 from schacon/appendix-final
280-
HEAD is now at df3f601... add atlas.json and cover image
280+
HEAD is now at df3f601... Add atlas.json and cover image
281281
----
282282

283283
Wenn Sie im Zustand „getrennter HEAD“ Änderungen vornehmen und dann einen Commit erstellen, bleibt der Tag gleich, aber Ihr neuer Commit gehört zu keinem Branch und ist unzugänglich, außer mit dem genauen Commit-Hash.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Wenn Sie zum Beispiel die Änderungen in einer Datei, die Sie zu dieser Übertra
2424

2525
[source,console]
2626
----
27-
$ git commit -m 'initial commit'
27+
$ git commit -m 'Initial commit'
2828
$ git add forgotten_file
2929
$ git commit --amend
3030
----

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ commit ca82a6dff817ec66f44342007202690a93763949
2121
Author: Scott Chacon <[email protected]>
2222
Date: Mon Mar 17 21:52:11 2008 -0700
2323
24-
changed the version number
24+
Change version number
2525
2626
commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
2727
Author: Scott Chacon <[email protected]>
2828
Date: Sat Mar 15 16:40:33 2008 -0700
2929
30-
removed unnecessary test
30+
Remove unnecessary test
3131
3232
commit a11bef06a3f659402fe7563abf99ad00de2209e6
3333
Author: Scott Chacon <[email protected]>
3434
Date: Sat Mar 15 10:31:28 2008 -0700
3535
36-
first commit
36+
Initial commit
3737
----
3838

3939
Standardmäßig listet `git log`, ohne Argumente, die in diesem Repository vorgenommenen Commits in umgekehrter chronologischer Reihenfolge auf, d.h. die neuesten Commits werden als erstes angezeigt.
@@ -52,7 +52,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
5252
Author: Scott Chacon <[email protected]>
5353
Date: Mon Mar 17 21:52:11 2008 -0700
5454
55-
changed the version number
55+
Change version number
5656
5757
diff --git a/Rakefile b/Rakefile
5858
index a874b73..8f94139 100644
@@ -72,7 +72,7 @@ commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
7272
Author: Scott Chacon <[email protected]>
7373
Date: Sat Mar 15 16:40:33 2008 -0700
7474
75-
removed unnecessary test
75+
Remove unnecessary test
7676
7777
diff --git a/lib/simplegit.rb b/lib/simplegit.rb
7878
index a0a60ae..47c6340 100644
@@ -101,7 +101,7 @@ commit ca82a6dff817ec66f44342007202690a93763949
101101
Author: Scott Chacon <[email protected]>
102102
Date: Mon Mar 17 21:52:11 2008 -0700
103103
104-
changed the version number
104+
Change version number
105105
106106
Rakefile | 2 +-
107107
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -110,7 +110,7 @@ commit 085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7
110110
Author: Scott Chacon <[email protected]>
111111
Date: Sat Mar 15 16:40:33 2008 -0700
112112
113-
removed unnecessary test
113+
Remove unnecessary test
114114
115115
lib/simplegit.rb | 5 -----
116116
1 file changed, 5 deletions(-)
@@ -119,7 +119,7 @@ commit a11bef06a3f659402fe7563abf99ad00de2209e6
119119
Author: Scott Chacon <[email protected]>
120120
Date: Sat Mar 15 10:31:28 2008 -0700
121121
122-
first commit
122+
Initial commit
123123
124124
README | 6 ++++++
125125
Rakefile | 23 +++++++++++++++++++++++
@@ -139,9 +139,9 @@ Darüber hinaus zeigen die Optionen `short`, `full`, und `fuller` die Ausgabe im
139139
[source,console]
140140
----
141141
$ git log --pretty=oneline
142-
ca82a6dff817ec66f44342007202690a93763949 changed the version number
143-
085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 removed unnecessary test
144-
a11bef06a3f659402fe7563abf99ad00de2209e6 first commit
142+
ca82a6dff817ec66f44342007202690a93763949 Change version number
143+
085bb3bcb608e1e8451d4b2432f8ecbe6306e7e7 Remove unnecessary test
144+
a11bef06a3f659402fe7563abf99ad00de2209e6 Initial commit
145145
----
146146

147147
Die interessanteste Option ist `format`, mit der Sie Ihr eigenes Log-Ausgabeformat festlegen können.
@@ -150,9 +150,9 @@ Dieses Verfahren ist besonders nützlich, wenn Sie Ausgaben für das maschinelle
150150
[source,console]
151151
----
152152
$ git log --pretty=format:"%h - %an, %ar : %s"
153-
ca82a6d - Scott Chacon, 6 years ago : changed the version number
154-
085bb3b - Scott Chacon, 6 years ago : removed unnecessary test
155-
a11bef0 - Scott Chacon, 6 years ago : first commit
153+
ca82a6d - Scott Chacon, 6 years ago : Change version number
154+
085bb3b - Scott Chacon, 6 years ago : Remove unnecessary test
155+
a11bef0 - Scott Chacon, 6 years ago : Initial commit
156156
----
157157

158158
<<pretty_format>> listet einige der nützlichsten Optionen auf, die `format` bietet.
@@ -190,15 +190,15 @@ Diese Option fügt ein schönes kleines ASCII-Diagramm hinzu, das Ihren Branch u
190190
[source,console]
191191
----
192192
$ git log --pretty=format:"%h %s" --graph
193-
* 2d3acf9 ignore errors from SIGCHLD on trap
193+
* 2d3acf9 Ignore errors from SIGCHLD on trap
194194
* 5e3ee11 Merge branch 'master' of git://github.com/dustin/grit
195195
|\
196-
| * 420eac9 Added a method for getting the current branch.
197-
* | 30e367c timeout code and tests
198-
* | 5a09431 add timeout protection to grit
199-
* | e1193f8 support for heads with slashes in them
196+
| * 420eac9 Add method for getting the current branch
197+
* | 30e367c Timeout code and tests
198+
* | 5a09431 Add timeout protection to grit
199+
* | e1193f8 Support for heads with slashes in them
200200
|/
201-
* d6016bc require time for xmlschema
201+
* d6016bc Require time for xmlschema
202202
* 11d191e Merge branch 'defunkt' into local
203203
----
204204

book/03-git-branching/sections/basic-branching-and-merging.asc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Sobald Sie das machen, bewegt das den `iss53`-Branch vorwärts, weil Sie in ihn
5050
[source,console]
5151
----
5252
$ vim index.html
53-
$ git commit -a -m 'added a new footer [issue 53]'
53+
$ git commit -a -m 'Create new footer [issue 53]'
5454
----
5555

5656
.Der `iss53`-Branch hat sich bei Ihrer Arbeit vorwärts bewegt
@@ -83,8 +83,8 @@ Lassen Sie uns einen `hotfix`-Branch erstellen, an dem Sie bis zu dessen Fertigs
8383
$ git checkout -b hotfix
8484
Switched to a new branch 'hotfix'
8585
$ vim index.html
86-
$ git commit -a -m 'fixed the broken email address'
87-
[hotfix 1fb7853] fixed the broken email address
86+
$ git commit -a -m 'Fix broken email address'
87+
[hotfix 1fb7853] Fix broken email address
8888
1 file changed, 2 insertions(+)
8989
----
9090

@@ -130,8 +130,8 @@ Jetzt können Sie zu dem Branch zurückwechseln, auf dem Sie mit Ihren Arbeiten
130130
$ git checkout iss53
131131
Switched to branch "iss53"
132132
$ vim index.html
133-
$ git commit -a -m 'finished the new footer [issue 53]'
134-
[iss53 ad82d7a] finished the new footer [issue 53]
133+
$ git commit -a -m 'Finish the new footer [issue 53]'
134+
[iss53 ad82d7a] Finish the new footer [issue 53]
135135
1 file changed, 1 insertion(+)
136136
----
137137

book/03-git-branching/sections/branch-management.asc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ Um sich den letzten Commit auf jedem Branch anzeigen zu lassen, können Sie die
2222
[source,console]
2323
----
2424
$ git branch -v
25-
iss53 93b412c fix javascript issue
25+
iss53 93b412c Fix javascript issue
2626
* master 7a98805 Merge branch 'iss53'
27-
testing 782fd34 add scott to the author list in the readmes
27+
testing 782fd34 Add scott to the author list in the readme
2828
----
2929

3030
Die nützlichen Optionen `--merged` und `--no-merged` können diese Liste nach Branches filtern, welche bereits mit dem Branch, auf dem Sie sich gegenwärtig befinden, zusammengeführt wurden und welche nicht.

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

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Durch das Hinzufügen der Dateien zur Staging Area erzeugt Git für jede Datei e
1414
[source,console]
1515
----
1616
$ git add README test.rb LICENSE
17-
$ git commit -m 'The initial commit of my project'
17+
$ git commit -m 'Initial commit'
1818
----
1919

2020
Wenn Sie mit der Anweisung `git commit` einen Commit erzeugen, berechnet Git für jedes Unterverzeichnis (in diesem Fall nur das Wurzelverzeichnis des Projektes) eine Prüfsumme und speichert diese als _tree_-Objekt im Git-Repository.
@@ -80,9 +80,9 @@ Diese Option wird `--decorate` genannt.
8080
[source,console]
8181
----
8282
$ git log --oneline --decorate
83-
f30ab (HEAD -> master, testing) add feature #32 - ability to add new formats to the central interface
84-
34ac2 Fixed bug #1328 - stack overflow under certain conditions
85-
98ca9 The initial commit of my project
83+
f30ab (HEAD -> master, testing) Add feature #32 - ability to add new formats to the central interface
84+
34ac2 Fix bug #1328 - stack overflow under certain conditions
85+
98ca9 Initial commit
8686
----
8787

8888
Sie können die `master`- und `testing`-Branches sehen, die sich rechts neben dem Commit von `f30ab` befinden.
@@ -124,6 +124,18 @@ Lassen Sie uns zurückwechseln zum `master`-Branch.
124124
$ git checkout master
125125
----
126126

127+
[NOTE]
128+
.`git log` zeigt *_nicht_* _alle_ Branches
129+
====
130+
Wenn Sie jetzt `git log` aufrufen würden, könnten Sie sich fragen, wohin der gerade erstellte " testing" Branch verschwunden ist, da er nicht in der Anzeige auftauchen würde.
131+
132+
Der Branch ist nicht spurlos verschwunden. Git weiß nur nicht, dass Sie sich für diesen Branch interessieren, und es versucht, Ihnen das zu zeigen, woran Sie seiner Meinung nach interessiert sind.
133+
Anders gesagt, standardmäßig zeigt `git log` nur den Commit-Verlauf innerhalb des Branchs an, den Sie ausgecheckt haben.
134+
135+
Um die Commit-Historie für den gewünschten Zweig anzuzeigen, müssen Sie ihn explizit angeben: `git log testing`.
136+
Um alle Branches zu sehen, fügen Sie `--all` zu Ihrem `git log` Kommando hinzu.
137+
====
138+
127139
.HEAD bewegt sich, wenn Sie auschecken
128140
image::images/checkout-master.png[HEAD bewegt sich, wenn Sie auschecken]
129141

@@ -163,11 +175,11 @@ Wenn Sie die Anweisung `git log --oneline --decorate --graph --all` ausführen,
163175
[source,console]
164176
----
165177
$ git log --oneline --decorate --graph --all
166-
* c2b9e (HEAD, master) made other changes
167-
| * 87ab2 (testing) made a change
178+
* c2b9e (HEAD, master) Made other changes
179+
| * 87ab2 (testing) Made a change
168180
|/
169-
* f30ab add feature #32 - ability to add new formats to the
170-
* 34ac2 fixed bug #1328 - stack overflow under certain conditions
181+
* f30ab Add feature #32 - ability to add new formats to the central interface
182+
* 34ac2 Fix bug #1328 - stack overflow under certain conditions
171183
* 98ca9 initial commit of my project
172184
----
173185

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ Das listet Ihre lokalen Branches zusammen mit weiteren Informationen auf, einsch
188188
[source,console]
189189
----
190190
$ git branch -vv
191-
iss53 7e424c3 [origin/iss53: ahead 2] forgot the brackets
192-
master 1ae2a45 [origin/master] deploying index fix
193-
* serverfix f8674d9 [teamone/server-fix-good: ahead 3, behind 1] this should do it
194-
testing 5ea463a trying something new
191+
iss53 7e424c3 [origin/iss53: ahead 2] Add forgotten brackets
192+
master 1ae2a45 [origin/master] Deploy index fix
193+
* serverfix f8674d9 [teamone/server-fix-good: ahead 3, behind 1] This should do it
194+
testing 5ea463a Try something new
195195
----
196196

197197
Hier können wir also sehen, dass unser `iss53`-Branch den Branch `origin/iss53` verfolgt und die Information „ahead 2“ bedeutet, dass wir zwei lokale Commits haben, welche noch nicht auf den Server hochgeladen wurden.

0 commit comments

Comments
 (0)