1 # Git Magic - A guide to using Git
2 # This file is distributed under the GNU GENERAL PUBLIC LICENSE Version 3.
3 # Benn Lynn <benlynn@gmail.com>, 2007.
4 # Armin Stebich <armin@lordofbikes.de>, 2010.
8 "Project-Id-Version: Git Magic deutsch\n"
9 "Report-Msgid-Bugs-To: git-magic@lordofbikes.de\n"
10 "POT-Creation-Date: 2010-11-05 17:47+0100\n"
11 "PO-Revision-Date: 2010-11-01 22:14+0100\n"
12 "Last-Translator: Armin Stebich <armin@lordofbikes.de>\n"
13 "Language-Team: DE <gitmagic@lordofbikes.de>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: UTF-8\n"
22 msgid "== Basic Tricks =="
23 msgstr "== Erste Schritte =="
28 "Rather than diving into a sea of Git commands, use these elementary examples "
29 "to get your feet wet. Despite their simplicity, each of them are useful. "
30 "Indeed, in my first months with Git I never ventured beyond the material in "
33 "Bevor wir uns in ein Meer von Git-Befehlen stürzen, schauen wir uns ein paar "
34 "einfache Beispiele an. Trotz ihrer Einfachheit, sind alle davon wichtig und "
35 "nützlich. Um ehrlich zu sein, meine ersten Monate mit Git brauchte ich nicht "
36 "mehr als in diesem Kapitel beschrieben steht."
40 msgid "=== Saving State ==="
41 msgstr "=== Stand sichern ==="
46 "About to attempt something drastic? Before you do, take a snapshot of all "
47 "files in the current directory with:"
49 "Hast du gravierende Änderungen vor? Nur zu, aber speichere deinen aktuellen "
50 "Stand vorher lieber nochmal ab:"
58 " $ git commit -m \"My first backup\"\n"
62 " $ git commit -m \"Meine erste Sicherung\"\n"
66 msgid "Now if your new edits go awry, restore the pristine version:"
68 "Falls deine Änderungen schief gehen, kannst du jetzt die alte Version "
74 msgid " $ git reset --hard\n"
75 msgstr " $ git reset --hard\n"
79 msgid "To save the state again:"
80 msgstr "Um den neuen Stand zu sichern:"
85 msgid " $ git commit -a -m \"Another backup\"\n"
86 msgstr " $ git commit -a -m \"Eine andere Sicherung\"\n"
90 msgid "=== Add, Delete, Rename ==="
91 msgstr "=== Hinzufügen, Löschen, Umbenennen ==="
96 "The above only keeps track of the files that were present when you first ran "
97 "*git add*. If you add new files or subdirectories, you'll have to tell Git:"
99 "Bisher kümmert sich Git nur um Dateien, die existierten, als du das erste "
100 "Mal *git add* ausgeführt hast. Wenn du Dateien oder Verzeichnisse "
101 "hinzufügst, musst du Git das mitteilen:"
104 #: ../en/basic.txt:29
106 msgid " $ git add readme.txt Documentation\n"
107 msgstr " $ git add readme.txt Dokumentation\n"
110 #: ../en/basic.txt:31
111 msgid "Similarly, if you want Git to forget about certain files:"
112 msgstr "Ebenso, wenn Git Dateien vergessen soll:"
115 #: ../en/basic.txt:34
118 " $ git rm kludge.h obsolete.c\n"
119 " $ git rm -r incriminating/evidence/\n"
121 " $ git rm ramsch.h veraltet.c\n"
122 " $ git rm -r belastendes/material/\n"
125 #: ../en/basic.txt:36
126 msgid "Git deletes these files for you if you haven't already."
127 msgstr "Git löscht diese Dateien für dich, falls du es noch nicht getan hast."
130 #: ../en/basic.txt:38
132 "Renaming a file is the same as removing the old name and adding the new "
133 "name. There's also the shortcut *git mv* which has the same syntax as the "
134 "*mv* command. For example:"
136 "Eine Datei umzubenennen ist das selbe wie sie zu löschen und unter neuem "
137 "Namen hinzuzufügen. Git benutzt hierzu die Abkürzung *git mv*, welche die "
138 "gleiche Syntax wie *mv* hat. Zum Beispiel:"
141 #: ../en/basic.txt:40
143 msgid " $ git mv bug.c feature.c\n"
144 msgstr " $ git mv fehler.c feature.c\n"
147 #: ../en/basic.txt:42
148 msgid "=== Advanced Undo/Redo ==="
149 msgstr "=== Fortgeschrittenes Rückgängig machen/Wiederherstellen ==="
152 #: ../en/basic.txt:44
154 "Sometimes you just want to go back and forget about every change past a "
155 "certain point because they're all wrong. Then:"
157 "Manchmal möchtest du einfach zurück gehen und alle Änderungen ab einem "
158 "bestimmten Zeitpunkt verwerfen, weil sie falsch waren. Dann:"
161 #: ../en/basic.txt:46
164 msgstr " $ git log\n"
167 #: ../en/basic.txt:48
168 msgid "shows you a list of recent commits, and their SHA1 hashes:"
170 "zeigt dir eine Liste der bisherigen 'Commits' und deren SHA1 Hashwerte:"
173 #: ../en/basic.txt:49
175 msgid "----------------------------------\n"
176 msgstr "----------------------------------\n"
179 #: ../en/basic.txt:53
182 "commit 766f9881690d240ba334153047649b8b8f11c664\n"
183 "Author: Bob <bob@example.com>\n"
184 "Date: Tue Mar 14 01:59:26 2000 -0800\n"
186 "commit 766f9881690d240ba334153047649b8b8f11c664\n"
187 "Author: Bob <bob@example.com>\n"
188 "Date: Tue Mar 14 01:59:26 2000 -0800\n"
191 #: ../en/basic.txt:55
193 msgid " Replace printf() with write().\n"
194 msgstr " Ersetze printf() mit write().\n"
197 #: ../en/basic.txt:59
200 "commit 82f5ea346a2e651544956a8653c0f58dc151275c\n"
201 "Author: Alice <alice@example.com>\n"
202 "Date: Thu Jan 1 00:00:00 1970 +0000\n"
204 "commit 82f5ea346a2e651544956a8653c0f58dc151275c\n"
205 "Author: Alice <alice@example.com>\n"
206 "Date: Thu Jan 1 00:00:00 1970 +0000\n"
209 #: ../en/basic.txt:61
213 "----------------------------------\n"
216 "----------------------------------\n"
219 #: ../en/basic.txt:65
221 "The first few characters of the hash are enough to specify the commit; "
222 "alternatively, copy and paste the entire hash. Type:"
224 "Die ersten paar Zeichen eines Hashwert reichen aus um einen 'Commit' zu "
225 "identifizieren; alternativ benutze kopieren und einfügen für den kompletten "
229 #: ../en/basic.txt:67
231 msgid " $ git reset --hard 766f\n"
232 msgstr " $ git reset --hard 766f\n"
235 #: ../en/basic.txt:69
237 "to restore the state to a given commit and erase all newer commits from the "
238 "record permanently."
240 "um den Stand eines bestimmten 'Commits' wieder herzustellen und alle "
241 "nachfolgenden Änderungen für immer zu löschen."
244 #: ../en/basic.txt:71
246 "Other times you want to hop to an old state briefly. In this case, type:"
248 "Ein anderes Mal willst du nur kurz zu einem älteren Stand springen. In "
249 "diesem Fall, gib folgendes ein:"
252 #: ../en/basic.txt:73
254 msgid " $ git checkout 82f5\n"
255 msgstr " $ git checkout 82f5\n"
258 #: ../en/basic.txt:75
260 "This takes you back in time, while preserving newer commits. However, like "
261 "time travel in a science-fiction movie, if you now edit and commit, you will "
262 "be in an alternate reality, because your actions are different to what they "
263 "were the first time around."
265 "Damit springst du in der Zeit zurück, behältst aber neuere Änderungen. Aber, "
266 "wie bei Zeitreisen in einem Science-Fiction-Film, wenn du jetzt etwas "
267 "änderst und 'commitest', gelangst du in ein alternative Realität, denn deine "
268 "Änderungen sind anders als beim früheren 'Commit'."
271 #: ../en/basic.txt:77
273 "This alternate reality is called a 'branch', and <<branch,we'll have more to "
274 "say about this later>>. For now, just remember that"
276 "Diese alternative Realität heißt 'Branch' und <<branch,wir kommen später "
277 "darauf zurück>>. Für jetzt, merke dir"
280 #: ../en/basic.txt:79
282 msgid " $ git checkout master\n"
283 msgstr " $ git checkout master\n"
286 #: ../en/basic.txt:82
288 "will take you back to the present. Also, to stop Git complaining, always "
289 "commit or reset your changes before running checkout."
291 "bringt dich wieder in die Gegenwart. Um zu verhindern, dass sich Git "
292 "beschwert, solltest du vor einem 'Checkout' alle Änderungen 'commiten' oder "
296 #: ../en/basic.txt:84
297 msgid "To take the computer game analogy again:"
298 msgstr "Um wieder die Computerspielanalogie anzuwenden:"
301 #: ../en/basic.txt:86
303 "- *`git reset --hard`*: load an old save and delete all saved games newer "
304 "than the one just loaded."
306 "- *`git reset --hard`*: Lade einen alten Stand und lösche alle Spielstände, "
307 "die neuer sind als der jetzt geladene."
310 #: ../en/basic.txt:88
312 "- *`git checkout`*: load an old game, but if you play on, the game state "
313 "will deviate from the newer saves you made the first time around. Any saved "
314 "games you make now will end up in a separate branch representing the "
315 "alternate reality you have entered. <<branch,We deal with this later>>."
317 "- *`git checkout`*: Lade einen alten Spielstand, aber wenn du weiterspielst, "
318 "wird der Spielstand von den früher gesicherten Spielständen abweichen. Jeder "
319 "Spielstand, der ab jetzt gesichert wird, entsteht in dem separaten 'Branch', "
320 "welcher der alternative Realität entspricht. <<branch,Dazu kommen wir "
324 #: ../en/basic.txt:90
326 "You can choose only to restore particular files and subdirectories by "
327 "appending them after the command:"
329 "Du kannst auch nur einzelne Dateien oder Verzeichnisse wiederherstellen "
330 "indem du sie an den Befehl anhängst:"
333 #: ../en/basic.txt:92
335 msgid " $ git checkout 82f5 some.file another.file\n"
336 msgstr " $ git checkout 82f5 eine.datei andere.datei\n"
339 #: ../en/basic.txt:96
341 "Take care, as this form of *checkout* can silently overwrite files. To "
342 "prevent accidents, commit before running any checkout command, especially "
343 "when first learning Git. In general, whenever you feel unsure about any "
344 "operation, Git command or not, first run *git commit -a*."
346 "Sei Vorsichtig, diese Art des '*Checkout*' kann Dateien überschreiben, ohne "
347 "dass du etwas merkst. Um Unfälle zu vermeiden solltest du immer 'commiten' "
348 "bevor du ein 'Checkout' machst, besonders am Anfang wenn du Git noch "
349 "erlernst. Allgemein gilt: Wenn du unsicher bist, egal ob ein Git Befehl oder "
350 "irgendeine andere Operation, führe zuerst *git commit -a* aus."
353 #: ../en/basic.txt:98
354 msgid "Don't like cutting and pasting hashes? Then use:"
355 msgstr "Du magst Kopieren und Einfügen von Hashes nicht? Dann nutze:"
358 #: ../en/basic.txt:100
360 msgid " $ git checkout :/\"My first b\"\n"
361 msgstr " $ git checkout :/\"Meine erste Si\"\n"
364 #: ../en/basic.txt:103
366 "to jump to the commit that starts with a given message. You can also ask "
367 "for the 5th-last saved state:"
369 "um zu einem 'Commit' zu springen, dessen Beschreibung so anfängt. Du kannst "
370 "auch nach dem 5. letzten 'Commit' fragen:"
373 #: ../en/basic.txt:105
375 msgid " $ git checkout master~5\n"
376 msgstr " $ git checkout master~5\n"
379 #: ../en/basic.txt:107
380 msgid "=== Reverting ==="
381 msgstr "=== Rückgängig machen ==="
384 #: ../en/basic.txt:109
386 "In a court of law, events can be stricken from the record. Likewise, you can "
387 "pick specific commits to undo."
389 "In einem Gerichtssaal können Ereignisse aus den Akten gelöscht werden. "
390 "Ähnlich kannst du gezielt 'Commits' rückgängig machen."
393 #: ../en/basic.txt:112
397 " $ git revert 1b6d\n"
400 " $ git revert 1b6d\n"
403 #: ../en/basic.txt:115
405 "will undo just the commit with the given hash. The revert is recorded as a "
406 "new commit, which you can confirm by running *git log*."
408 "wird den 'Commit' mit dem angegebenen Hashwert rückgängig machen. Das "
409 "Rückgängig machen wird als neuer 'Commit' erstellt, was mit *git log* "
410 "überprüft werden kann."
413 #: ../en/basic.txt:117
414 msgid "=== Changelog Generation ==="
415 msgstr "=== Changelog erstellen ==="
418 #: ../en/basic.txt:120
420 "Some projects require a http://en.wikipedia.org/wiki/Changelog[changelog]. "
421 "Generate one by typing:"
423 "Verschiedene Projekte benötigen ein http://de.wikipedia.org/wiki/"
424 "%C3%84nderungsprotokoll[Änderungsprotokoll]. Das kannst du mit folgendem "
428 #: ../en/basic.txt:122
430 msgid " $ git log > ChangeLog\n"
431 msgstr " $ git log > ChangeLog\n"
434 #: ../en/basic.txt:124
435 msgid "=== Downloading Files ==="
436 msgstr "=== Dateien herunterladen ==="
439 #: ../en/basic.txt:126
440 msgid "Get a copy of a project managed with Git by typing:"
441 msgstr "Eine Kopie eines mit Git verwalteten Projekts bekommst du mit:"
444 #: ../en/basic.txt:128
446 msgid " $ git clone git://server/path/to/files\n"
447 msgstr " $ git clone git://server/pfad/zu/dateien\n"
450 #: ../en/basic.txt:130
451 msgid "For example, to get all the files I used to create this site:"
453 "Um zum Beispiel alle Dateien zu bekommen, die ich zum Erzeugen dieser Seiten "
457 #: ../en/basic.txt:132
459 msgid " $ git clone git://git.or.cz/gitmagic.git\n"
460 msgstr " $ git clone git://git.or.cz/gitmagic.git\n"
463 #: ../en/basic.txt:134
464 msgid "We'll have much to say about the *clone* command soon."
465 msgstr "Es gibt gleich noch viel mehr über den 'clone' Befehl zu sagen."
468 #: ../en/basic.txt:136
469 msgid "=== The Bleeding Edge ==="
470 msgstr "=== Das Neueste vom Neuen ==="
473 #: ../en/basic.txt:138
475 "If you've already downloaded a copy of a project using *git clone*, you can "
476 "upgrade to the latest version with:"
478 "Wenn du schon eine Kopie eines Projektes hast, kannst du es auf die neuste "
479 "Version aktualisieren mit:"
482 #: ../en/basic.txt:140 ../en/basic.txt:166
484 msgid " $ git pull\n"
485 msgstr " $ git pull\n"
488 #: ../en/basic.txt:142
489 msgid "=== Instant Publishing ==="
490 msgstr "=== Einfaches Veröffentlichen ==="
493 #: ../en/basic.txt:144
495 "Suppose you've written a script you'd like to share with others. You could "
496 "just tell them to download from your computer, but if they do so while "
497 "you're improving the script or making experimental changes, they could wind "
498 "up in trouble. Of course, this is why release cycles exist. Developers may "
499 "work on a project frequently, but they only make the code available when "
500 "they feel it is presentable."
502 "Angenommen du hast ein Skript geschrieben und möchtest es anderen zugänglich "
503 "machen. Du könntest sie einfach bitten es von deinem Computer "
504 "herunterzuladen, aber falls sie das tun während du experimentierst oder das "
505 "Skript verbesserst könnten sie in Schwierigkeiten geraten. Genau deswegen "
506 "gibt es Releasezyklen. Entwickler arbeiten regelmäßig an einem Projekt, "
507 "veröffentlichen den Code aber nur, wenn sie ihn für vorzeigbar halten."
510 #: ../en/basic.txt:146
511 msgid "To do this with Git, in the directory where your script resides:"
512 msgstr "Um dies in Git zu tun, gehe ins Verzeichnis in dem das Skript liegt:"
515 #: ../en/basic.txt:150
520 " $ git commit -m \"First release\"\n"
524 " $ git commit -m \"Erster Stand\"\n"
527 #: ../en/basic.txt:152
528 msgid "Then tell your users to run:"
529 msgstr "Dann sage deinen Nutzern:"
532 #: ../en/basic.txt:154
534 msgid " $ git clone your.computer:/path/to/script\n"
535 msgstr " $ git clone dein.computer:/pfad/zum/skript\n"
538 #: ../en/basic.txt:156
540 "to download your script. This assumes they have ssh access. If not, run *git "
541 "daemon* and tell your users to instead run:"
543 "um dein Skript herunterzuladen. Das setzt voraus, dass sie einen SSH-Zugang "
544 "haben. Falls nicht, führe *git deamon* aus und sage den Nutzern folgendes:"
547 #: ../en/basic.txt:158
549 msgid " $ git clone git://your.computer/path/to/script\n"
550 msgstr " $ git clone git://dein.computer/pfad/zum/skript\n"
553 #: ../en/basic.txt:160
554 msgid "From now on, every time your script is ready for release, execute:"
555 msgstr "Ab jetzt, immer wenn dein Skript reif für eine Veröffentlichung ist:"
558 #: ../en/basic.txt:162
560 msgid " $ git commit -a -m \"Next release\"\n"
561 msgstr " $ git commit -a -m \"Nächster Stand\"\n"
564 #: ../en/basic.txt:164
566 "and your users can upgrade their version by changing to the directory "
567 "containing your script and typing:"
568 msgstr "und deine Nutzer können ihr Skript aktualisieren mit:"
571 #: ../en/basic.txt:168
573 "Your users will never end up with a version of your script you don't want "
576 "Deine Nutzer werden nie mit Versionen in Kontakt kommen, von denen du es "
577 "nicht willst. Natürlich funktioniert der Trick für fast alles, nicht nur "
581 #: ../en/basic.txt:170
582 msgid "=== What Have I Done? ==="
583 msgstr "=== Was habe ich getan? ==="
586 #: ../en/basic.txt:172
587 msgid "Find out what changes you've made since the last commit with:"
588 msgstr "Finde heraus was du seit dem letzten 'Commit' getan hast:"
591 #: ../en/basic.txt:174
593 msgid " $ git diff\n"
594 msgstr " $ git diff\n"
597 #: ../en/basic.txt:176
598 msgid "Or since yesterday:"
599 msgstr "Oder seit Gestern:"
602 #: ../en/basic.txt:178
604 msgid " $ git diff \"@{yesterday}\"\n"
605 msgstr " $ git diff \"@{gestern}\"\n"
608 #: ../en/basic.txt:180
609 msgid "Or between a particular version and 2 versions ago:"
610 msgstr "Oder zwischen irgendeiner Version und der vorvorletzten:"
613 #: ../en/basic.txt:182
615 msgid " $ git diff 1b6d \"master~2\"\n"
616 msgstr " $ git diff 1b6d \"master~2\"\n"
619 #: ../en/basic.txt:185
621 "In each case the output is a patch that can be applied with *git apply*. "
624 "Jedes mal ist die Ausgabe ein 'Patch' der mit *git apply* eingespielt werden "
625 "kann. Versuche auch:"
628 #: ../en/basic.txt:187
630 msgid " $ git whatchanged --since=\"2 weeks ago\"\n"
631 msgstr " $ git whatchanged --since=\"2 weeks ago\"\n"
634 #: ../en/basic.txt:193
636 "Often I'll browse history with http://sourceforge.net/projects/qgit[qgit] "
637 "instead, due to its slick photogenic interface, or http://jonas.nitro.dk/tig/"
638 "[tig], a text-mode interface that works well over slow connections. "
639 "Alternatively, install a web server, run *git instaweb* and fire up any web "
642 "Um mir die Geschichte eines 'Repositories' anzuzeigen benutze ich häufig "
643 "http://sourceforge.net/projects/qgit[qgit] da es eine schicke "
644 "Benutzeroberfläche hat, oder http://jonas.nitro.dk/tig/[tig], eine "
645 "Konsolenanwendung, die sehr gut über langsame Verbindungen funktioniert. "
646 "Alternativ kannst du einen Webserver installieren mit *git instaweb*, dann "
647 "kannst du mit jedem Webbrowser darauf zugreifen."
650 #: ../en/basic.txt:195
651 msgid "=== Exercise ==="
652 msgstr "=== Übung ==="
655 #: ../en/basic.txt:197
657 "Let A, B, C, D be four successive commits where B is the same as A except "
658 "some files have been removed. We want to add the files back at D. How can we "
661 "A, B, C, D sind 4 aufeinander folgende 'Commits'. B ist identisch mit A, "
662 "außer dass einige Dateien gelöscht wurden. Wir möchten die Dateien in D "
663 "wieder hinzufügen, aber nicht in B. Wie machen wir das?"
666 #: ../en/basic.txt:199
667 msgid "There are at least three solutions. Assuming we are at D:"
668 msgstr "Es gibt mindestens 3 Lösungen. Angenommen, wir sind bei D:"
670 #. type: Bullet: ' 1. '
671 #: ../en/basic.txt:201
673 "The difference between A and B are the removed files. We can create a patch "
674 "representing this difference and apply it:"
676 "Der Unterschied zwischen A und B sind die gelöschten Dateien. Wir können "
677 "einen 'Patch' erstellen, der diesen Unterschied darstellt und diesen dann "
681 #: ../en/basic.txt:203
683 msgid " $ git diff B A | git apply\n"
684 msgstr " $ git diff B A | git apply\n"
686 #. type: Bullet: ' 2. '
687 #: ../en/basic.txt:205
688 msgid "Since we saved the files back at A, we can retrieve them:"
690 "Da die Dateien im 'Repository' unter dem 'Commit' A gespeichert sind, können "
691 "wir sie wieder herstellen:"
694 #: ../en/basic.txt:207
696 msgid " $ git checkout A foo.c bar.h\n"
697 msgstr " $ git checkout A foo.c bar.h\n"
699 #. type: Bullet: ' 3. '
700 #: ../en/basic.txt:209
701 msgid "We can view going from A to B as a change we want to undo:"
703 "Wir können den 'Commit' von A auf B als Änderung betrachten, die wir "
704 "rückgängig machen wollen:"
707 #: ../en/basic.txt:211
709 msgid " $ git revert B\n"
710 msgstr " $ git revert B\n"
713 #: ../en/basic.txt:212
715 "Which choice is best? Whichever you prefer most. It is easy to get what you "
716 "want with Git, and often there are many ways to get it."
718 "Welche Lösung ist die beste? Die, welche dir am besten gefällt. Es ist "
719 "einfach mit Git das zu bekommen was du willst und oft führen viele Wege zum "