You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Translated book/10-git-internals/sections/refs.asc to german. (#32)
* Translated book/10-git-internals/sections/refs.asc to german.
Corrected TRANSLATION_NOTES_DE.asc (Merge conlict)
* Minor corrections on the two changed files
* Changed Plural of Leutnant to Leutnants
HEAD; Singular: der HEAD; Plural: die HEADs; Oft kann HEAD ohne Artikel verwendet werden
93
+
95
94
|Feature|
96
95
Singular: das Thema; Plural: die Eigenschaften
97
96
|to fetch|
@@ -100,6 +99,8 @@ fetchen; er/sie fetcht; wir fetchen; Vorzugsweise die englische Version nutzen,
100
99
forken; er/sie forkt; wir forken; Vorzugsweise die englische Version nutzen, alternativ kann auch die deutsche Übersetzung 'abspalten' verwendet werden
101
100
|Fork|
102
101
Fork; Singular: der Fork; Plural: die Fork; Vorzugsweise die englische Version nutzen, alternativ kann auch die deutsche Übersetzung 'Abspaltung' verwendet werden je nach Kontext
102
+
|HEAD|
103
+
HEAD; Singular: der HEAD; Plural: die HEADs; Oft kann HEAD ohne Artikel verwendet werden
>>>>>>> Translated book/05-distributed-git/sections/contributing.asc to german
122
119
|Maintainer|
123
120
Projektbetreuer
124
121
|to maintain|
@@ -127,10 +124,10 @@ betreuen
127
124
mergen; er/sie mergt; wir mergen; Vorzugsweise die englische Version nutzen, alternativ kann auch die deutsche Übersetzung "zusammenführen oder verschmelzen" verwendet werden.
128
125
|Patch|
129
126
Änderung oder auch Patch
130
-
|Porcelain|
131
-
Hauptbefehle
132
-
|Plumbing|
133
-
Basiskommandos
127
+
|Porcelain commands|
128
+
Standardbefehle
129
+
|Plumbing commands|
130
+
Basisbefehle
134
131
|to pull|
135
132
pullen; er/sie pullt; wir pullen; Deutsch: übernehmen
If you were interested in seeing the history of your repository reachable from commit, say, `1a410e`, you could run something like `git log 1a410e` to display that history, but you would still have to remember that `1a410e` is the commit you want to use as the starting point for that history.
5
-
Instead, it would be easier if you had a file in which you could store that SHA-1 value under a simple name so you could use that simple name rather than the raw SHA-1 value.
4
+
Wenn Sie den Verlauf Ihres Repositorys sehen möchten, der über Commit erreichbar ist, z. B. `1a410e`, können Sie so etwas wie `git log 1a410e` ausführen, um diesen Verlauf anzuzeigen. Dennoch müssen Sie sich weiterhin daran erinnern, dass `1a410e` der Commit ist den Sie als Ausgangspunkt für diese Historie verwenden möchten.
5
+
Es wäre aber einfacher, wenn Sie eine Datei hätten, in der Sie diesen SHA-1-Wert unter einem einfachen Namen speichern könnten, sodass Sie diesen einfachen Namen anstelle des unformatierten SHA-1-Werts verwenden könnten.
6
6
7
-
In Git, these simple names are called ``references'' or ``refs''; you can find the files that contain those SHA-1 values in the `.git/refs` directory.
8
-
In the current project, this directory contains no files, but it does contain a simple structure:
7
+
In Git werden diese einfachen Namen „Referenzen“ oder „Refs“ genannt. Sie finden die Dateien, die diese SHA-1-Werte enthalten, im Verzeichnis `.git/refs`.
8
+
Im aktuellen Projekt enthält dieses Verzeichnis keine Dateien, es enthält eine einfache Struktur:
9
9
10
10
[source,console]
11
11
----
@@ -16,14 +16,14 @@ $ find .git/refs
16
16
$ find .git/refs -type f
17
17
----
18
18
19
-
To create a new reference that will help you remember where your latest commit is, you can technically do something as simple as this:
19
+
Um eine neue Referenz zu erstellen, die Ihnen hilft, sich zu erinnern, wo sich Ihr letztes Commit befindet, können Sie einfach folgende machen:
Now, you can use the head reference you just created instead of the SHA-1 value in your Git commands:
26
+
Jetzt können Sie die soeben erstellte Kopfreferenz anstelle des SHA-1-Werts in Ihren Git-Befehlen verwenden:
27
27
28
28
[source,console]
29
29
----
@@ -33,22 +33,22 @@ cac0cab538b970a37ea1e769cbbde608743bc96d second commit
33
33
fdf4fc3344e67ab068f836878b6c4951e3b15f3d first commit
34
34
----
35
35
36
-
You aren't encouraged to directly edit the reference files; instead, Git provides the safer command `git update-ref` to do this if you want to update a reference:
36
+
Es wird nicht empfohlen, die Referenzdateien direkt zu bearbeiten. Stattdessen bietet Git den sichereren `Befehl git update-ref`, um dies zu tun, wenn Sie eine Referenz aktualisieren möchten:
That's basically what a branch in Git is: a simple pointer or reference to the head of a line of work.
44
-
To create a branch back at the second commit, you can do this:
43
+
Das ist im Grunde genommen ein Branch in Git: ein einfacher Zeiger oder ein Verweis auf den Kopf einer Arbeitslinie.
44
+
So erstellen Sie eine Verzweigung beim zweiten Commit:
45
45
46
46
[source,console]
47
47
----
48
48
$ git update-ref refs/heads/test cac0ca
49
49
----
50
50
51
-
Your branch will contain only work from that commit down:
51
+
Ihr Branch enthält nur Arbeiten von diesem Commit an abwärts:
52
52
53
53
[source,console]
54
54
----
@@ -57,53 +57,53 @@ cac0cab538b970a37ea1e769cbbde608743bc96d second commit
57
57
fdf4fc3344e67ab068f836878b6c4951e3b15f3d first commit
58
58
----
59
59
60
-
Now, your Git database conceptually looks something like this:
60
+
Nun sieht Ihre Git-Datenbank konzeptionell ungefähr so aus:
61
61
62
-
.Git directory objects with branch head references included.
63
-
image::images/data-model-4.png[Git directory objects with branch head references included.]
62
+
.Git-Verzeichnisobjekte mit Branch Head Referenzen.
63
+
image::images/data-model-4.png[Git-Verzeichnisobjekte mit Branch Head Referenzen.]
64
64
65
-
When you run commands like `git branch <branch>`, Git basically runs that `update-ref` command to add the SHA-1 of the last commit of the branch you're on into whatever new reference you want to create.
65
+
Wenn Sie Befehle wie `git branch <branch>` ausführen, führt Git grundsätzlich den Befehl `update-ref` aus, um den SHA-1 des letzten Commits des Branches, in dem Sie sich befinden, in die neue Referenz einzufügen, die Sie erstellen möchten.
66
66
67
67
[[ref_the_ref]]
68
-
==== The HEAD
68
+
==== HEAD
69
69
70
-
The question now is, when you run `git branch <branch>`, how does Git know the SHA-1 of the last commit?
71
-
The answer is the HEAD file.
70
+
Die Frage ist nun, wenn Sie `git branch <branch>` ausführen, woher kennt Git den SHA-1 des letzten Commits?
71
+
Die Antwort ist die HEAD-Datei.
72
72
73
-
Usually the HEAD file is a symbolic reference to the branch you're currently on.
74
-
By symbolic reference, we mean that unlike a normal reference, it contains a pointer to another reference.
73
+
Normalerweise ist die HEAD-Datei ein symbolischer Verweis auf den Branch, in dem Sie sich gerade befinden.
74
+
Mit symbolischer Referenz meinen wir, dass sie im Gegensatz zu einer normalen Referenz einen Zeiger auf eine andere Referenz enthält.
75
75
76
-
However in some rare cases the HEAD file may contain the SHA-1 value of a git object.
77
-
This happens when you checkout a tag, commit, or remote branch, which puts your repository in https://git-scm.com/docs/git-checkout#_detached_head["detached HEAD"] state.
76
+
In einigen seltenen Fällen kann die HEAD-Datei jedoch den SHA-1-Wert eines Git-Objekts enthalten.
77
+
Dies geschieht beim Auschecken eines Tags, Commits oder eines Remote-Branches, wodurch Ihr Repository in den Status https://git-scm.com/docs/git-checkout#_detached_head["detached HEAD"] versetzt wird.
78
78
79
-
If you look at the file, you'll normally see something like this:
79
+
Wenn Sie sich die Datei ansehen, sehen Sie normalerweise Folgendes:
80
80
81
81
[source,console]
82
82
----
83
83
$ cat .git/HEAD
84
84
ref: refs/heads/master
85
85
----
86
86
87
-
If you run `git checkout test`, Git updates the file to look like this:
87
+
Wenn Sie `git checkout test` ausführen, aktualisiert Git die Datei folgendermaßen:
88
88
89
89
[source,console]
90
90
----
91
91
$ cat .git/HEAD
92
92
ref: refs/heads/test
93
93
----
94
94
95
-
When you run `git commit`, it creates the commit object, specifying the parent of that commit object to be whatever SHA-1 value the reference in HEAD points to.
95
+
Wenn Sie `git commit` ausführen, wird das Commitobjekt erstellt, wobei das übergeordnete Objekt dieses Commitobjekts als der SHA-1-Wert angegeben wird, auf den die Referenz in HEAD verweist.
96
96
97
-
You can also manually edit this file, but again a safer command exists to do so: `git symbolic-ref`.
98
-
You can read the value of your HEAD via this command:
97
+
Sie können diese Datei auch manuell bearbeiten, es gibt jedoch wieder einen sichereren Befehl: `git symbolic-ref`.
98
+
Sie können den Wert Ihres HEAD über diesen Befehl lesen:
99
99
100
100
[source,console]
101
101
----
102
102
$ git symbolic-ref HEAD
103
103
refs/heads/master
104
104
----
105
105
106
-
You can also set the value of HEAD using the same command:
106
+
Sie können den Wert von HEAD auch mit demselben Befehl festlegen:
107
107
108
108
[source,console]
109
109
----
@@ -112,7 +112,7 @@ $ cat .git/HEAD
112
112
ref: refs/heads/test
113
113
----
114
114
115
-
You can't set a symbolic reference outside of the refs style:
115
+
Sie können keine symbolische Referenz außerhalb des Refs-Stils festlegen:
116
116
117
117
[source,console]
118
118
----
@@ -122,38 +122,38 @@ fatal: Refusing to point HEAD outside of refs/
122
122
123
123
==== Tags
124
124
125
-
We just finished discussing Git's three main object types (_blobs_, _trees_ and _commits_), but there is a fourth.
126
-
The _tag_ object is very much like a commit object -- it contains a tagger, a date, a message, and a pointer.
127
-
The main difference is that a tag object generally points to a commit rather than a tree.
128
-
It's like a branch reference, but it never moves -- it always points to the same commit but gives it a friendlier name.
125
+
Wir haben gerade die drei Hauptobjekttypen von Git (_blobs_, _trees_ und _commits_) besprochen, aber es gibt einen vierten.
126
+
Das _tag_-Objekt ähnelt stark einem Commitobjekt -- es enthält einen Tagger, ein Datum, eine Nachricht und einen Zeiger.
127
+
Der Hauptunterschied besteht darin, dass ein Tag-Objekt im Allgemeinen eher auf ein Commit als auf einen Baum verweist.
128
+
Es ist wie eine Branchreferenz, aber es bewegt sich nie -- es zeigt immer auf das gleiche Commit, gibt ihm aber einen lesbareren Namen.
129
129
130
-
As discussed in <<ch02-git-basics-chapter#ch02-git-basics-chapter>>, there are two types of tags: annotated and lightweight.
131
-
You can make a lightweight tag by running something like this:
130
+
Wie in <<ch02-git-basics-chapter#ch02-git-basics-chapter>> beschrieben, gibt es zwei Arten von Tags: Annotierte- und Leichtgewichtige-Tags.
131
+
Sie können einen leichtgewichtigen Tag erstellen, indem Sie Folgendes ausführen:
That is all a lightweight tag is -- a reference that never moves.
139
-
An annotated tag is more complex, however.
140
-
If you create an annotated tag, Git creates a tag object and then writes a reference to point to it rather than directly to the commit.
141
-
You can see this by creating an annotated tag (using the `-a` option):
138
+
Das ist alles, was ein leichtgewichtiger Tag ist -- eine Referenz, die sich nie bewegt.
139
+
Ein annotierter Tag ist jedoch komplexer.
140
+
Wenn Sie einen annotierten Tag erstellen, erstellt Git ein Tag-Objekt und schreibt dann einen Verweis, um darauf zu zeigen, anstatt direkt auf das Commit.
141
+
Sie können dies sehen, indem Sie ein annotierten Tag erstellen (mit der Option `-a`):
142
142
143
143
[source,console]
144
144
----
145
145
$ git tag -a v1.1 1a410efbd13591db07496601ebc7a059dd55cfe9 -m 'test tag'
146
146
----
147
147
148
-
Here's the object SHA-1 value it created:
148
+
Hier ist der Wert für das Objekt SHA-1, das erstellt wurde:
149
149
150
150
[source,console]
151
151
----
152
152
$ cat .git/refs/tags/v1.1
153
153
9585191f37f7b0fb9444f35a9bf50de191beadc2
154
154
----
155
155
156
-
Now, run `git cat-file -p` on that SHA-1 value:
156
+
Führen Sie nun `git cat-file -p` für diesen SHA-1-Wert aus:
157
157
158
158
[source,console]
159
159
----
@@ -166,23 +166,23 @@ tagger Scott Chacon <[email protected]> Sat May 23 16:48:58 2009 -0700
166
166
test tag
167
167
----
168
168
169
-
Notice that the object entry points to the commit SHA-1 value that you tagged.
170
-
Also notice that it doesn't need to point to a commit; you can tag any Git object.
171
-
In the Git source code, for example, the maintainer has added their GPG public key as a blob object and then tagged it.
172
-
You can view the public key by running this in a clone of the Git repository:
169
+
Beachten Sie, dass der Objekteintrag auf den Commit SHA-1-Wert verweist, den Sie getagged haben.
170
+
Beachten Sie auch, dass es nicht auf ein Commit verweisen muss. Sie können jedes Git-Objekt taggen.
171
+
Beispielsweise hat der Betreuer im Git-Quellcode seinen öffentlichen GPG-Schlüssel als Blob-Objekt hinzugefügt und dann mit Tags versehen.
172
+
Sie können den öffentlichen Schlüssel anzeigen, indem Sie diesen in einem Klon des Git-Repositorys ausführen:
173
173
174
174
[source,console]
175
175
----
176
176
$ git cat-file blob junio-gpg-pub
177
177
----
178
178
179
-
The Linux kernel repository also has a non-commit-pointing tag object -- the first tag created points to the initial tree of the import of the source code.
179
+
Das Linux-Kernel-Repository verfügt auch über ein Tag-Objekt, das nicht auf Commits verweist. Das erste erstellte Tag verweist auf den ursprünglichen Baum des Imports des Quellcodes.
180
180
181
181
==== Remotes
182
182
183
-
The third type of reference that you'll see is a remote reference.
184
-
If you add a remote and push to it, Git stores the value you last pushed to that remote for each branch in the `refs/remotes` directory.
185
-
For instance, you can add a remote called `origin` and push your `master` branch to it:
183
+
Der dritte Referenztyp, den Sie sehen, ist eine Remotereferenz.
184
+
Wenn Sie ein Remote hinzufügen und darauf pushen, speichert Git den Wert, den Sie zuletzt an diesen Remote gesendet haben, für jeden Zweig im Verzeichnis `refs/remotes`.
185
+
Zum Beispiel können Sie eine Remote mit dem Namen `origin` hinzufügen und Ihren `master` -Zweig darauf pushen:
186
186
187
187
[source,console]
188
188
----
@@ -196,14 +196,14 @@ To [email protected]:schacon/simplegit-progit.git
196
196
a11bef0..ca82a6d master -> master
197
197
----
198
198
199
-
Then, you can see what the `master` branch on the `origin` remote was the last time you communicated with the server, by checking the `refs/remotes/origin/master` file:
199
+
Anschließend können Sie in der Datei `refs/remotes/origin/master` sehen, in welcher `master` Branch auf dem `origin`-Remote Sie das letzte Mal mit dem Server kommuniziert haben:
200
200
201
201
[source,console]
202
202
----
203
203
$ cat .git/refs/remotes/origin/master
204
204
ca82a6dff817ec66f44342007202690a93763949
205
205
----
206
206
207
-
Remote references differ from branches (`refs/heads` references) mainly in that they're considered read-only.
208
-
You can `git checkout` to one, but Git won't point HEAD at one, so you'll never update it with a `commit` command.
209
-
Git manages them as bookmarks to the last known state of where those branches were on those servers.
207
+
Remote Referenzen unterscheiden sich von Braches (`refs/heads`-Referenzen) hauptsächlich darin, dass sie als schreibgeschützt gelten.
208
+
Sie können `git checkout` darauf ausführen, aber HEAD wird nicht darauf zeigen, so dass Sie es niemals mit einem `commit`-Befehl aktualisieren können.
209
+
Git verwaltet sie als Lesezeichen für den letzten bekannten Status, in dem sich diese Branches auf diesen Servern befinden.
0 commit comments