Skip to content

Commit

Permalink
Add German translation parts for interactive adding and git add -p
Browse files Browse the repository at this point in the history
  • Loading branch information
frakturfreak committed Apr 3, 2010
1 parent 265f0b0 commit 019a84e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion de/06-git-tools/01-chapter6.markdown
Expand Up @@ -424,7 +424,7 @@ Das `*` neben den Dateinamen bedeutet, daß die Datei ausgewählt ist und zur St

Now you can see that the TODO and index.html files are staged and the simplegit.rb file is still unstaged. If you want to unstage the TODO file at this point, you use the `3` or `r` (for revert) option:

Du kannst sehen, daß die TODO und index.html Dateien jetzt gestaged sind, während simple xxx
Du kannst sehen, daß die TODO und index.html Dateien jetzt gestaged sind, während simplegit.rb immer noch ungestaged ist. Wenn du die TODO unstagen willst, kannst du die Option `3` oder `r` (für revert) nutzen:

*** Commands ***
1: status 2: update 3: revert 4: add untracked
Expand All @@ -444,6 +444,8 @@ Du kannst sehen, daß die TODO und index.html Dateien jetzt gestaged sind, währ

Looking at your Git status again, you can see that you’ve unstaged the TODO file:

Wenn du wiederum deinen Git status ansiehst, kannst du sehen dass du die TODO ungestaged hast.

*** Commands ***
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
Expand All @@ -455,6 +457,8 @@ Looking at your Git status again, you can see that you’ve unstaged the TODO fi

To see the diff of what you’ve staged, you can use the `6` or `d` (for diff) command. It shows you a list of your staged files, and you can select the ones for which you would like to see the staged diff. This is much like specifying `git diff --cached` on the command line:

Um einen Diff dessen zu sehen, das du gestaged hast, kannst du den Befehl `6` oder `d` (für diff) nutzen. Dieser zeigt dir eine Liste der gestageden Dateien, und du kannst diejenigen auswählen, von denen du den gestageden Diff sehen willst. Dies ähnelt sehr dem Befehl `git diff --cached` auf der Kommandozeile.

*** Commands ***
1: status 2: update 3: revert 4: add untracked
5: patch 6: diff 7: quit 8: help
Expand All @@ -477,10 +481,16 @@ To see the diff of what you’ve staged, you can use the `6` or `d` (for diff) c

With these basic commands, you can use the interactive add mode to deal with your staging area a little more easily.

Mit diesen grundlegenden Befehlen kannst du den interaktiven add Modus nutzen um dir den Umgang mit deiner Staging area etwas zu erleichtern.

### Staging Patches ###

### Patches stagen ###

It’s also possible for Git to stage certain parts of files and not the rest. For example, if you make two changes to your simplegit.rb file and want to stage one of them and not the other, doing so is very easy in Git. From the interactive prompt, type `5` or `p` (for patch). Git will ask you which files you would like to partially stage; then, for each section of the selected files, it will display hunks of the file diff and ask if you would like to stage them, one by one:

Es ist für Git auch möglich bestimmte Teile einer Datei zu stagen und nicht den Rest. Wenn du z. B. 2 Veränderungen an der simplegit.rb machst und eine davon stagen willst und die andere nicht, ist dies sehr einfach in Git möglich. Wähle `5` oder `p` (für patch) auf dem interactive prompt. Git wird dich fragen welche Dateien du teilweise stagen willst; dann wird es für jeden Abschnitt der gewählten Dateien diff hunks ausgeben und dich jeweils einzeln fragen ob du sie stagen willst.

diff --git a/lib/simplegit.rb b/lib/simplegit.rb
index dd5ecc4..57399e0 100644
--- a/lib/simplegit.rb
Expand All @@ -498,6 +508,8 @@ It’s also possible for Git to stage certain parts of files and not the rest. F

You have a lot of options at this point. Typing `?` shows a list of what you can do:

Du hast an diesem Punkt viele Options. Tippe `?` ein um eine Liste der Möglichkeiten zu bekommen:

Stage this hunk [y,n,a,d,/,j,J,g,e,?]? ?
y - stage this hunk
n - do not stage this hunk
Expand All @@ -515,6 +527,8 @@ You have a lot of options at this point. Typing `?` shows a list of what you can

Generally, you’ll type `y` or `n` if you want to stage each hunk, but staging all of them in certain files or skipping a hunk decision until later can be helpful too. If you stage one part of the file and leave another part unstaged, your status output will look like this:

Im Allgemeinen, wirst du `y` oder `n` nutzen wenn du jeden Hunk stagen willst, aber alle Hunks in bestimmten Dateien zu stagen oder die Entscheidung für einen Hunk auf später zu verschieben kann auch sehr hilfreich sein. Wenn du nur einen Teil der Datei stagest und den anderen ungestaged lässt, sieht deine Status-Ausgabe in etwa so aus:

What now> 1
staged unstaged path
1: unchanged +0/-1 TODO
Expand All @@ -523,8 +537,12 @@ Generally, you’ll type `y` or `n` if you want to stage each hunk, but staging

The status of the simplegit.rb file is interesting. It shows you that a couple of lines are staged and a couple are unstaged. You’ve partially staged this file. At this point, you can exit the interactive adding script and run `git commit` to commit the partially staged files.

Der Status der simplegit.rb ist interessant. Er zeigt dir, dass ein paar Zeilen gestagd und ein paar ungestaged sind. Du hast diese Datei teilweise gestaged. An dieser Stelle kannst du das interaktive add Skript verlassen und `git commit` ausführen, um die teilweise gestageden Dateien zu commiten.

Finally, you don’t need to be in interactive add mode to do the partial-file staging — you can start the same script by using `git add -p` or `git add --patch` on the command line.

Letztendlich musst du nicht den interactive add Modus nutzen um Dateien teilweise zu stagen – du kannst das gleiche Skript starten in dem du `git add -p` oder `git add --patch` auf der Kommandozeile eingibst.

## Stashing ##

Often, when you’ve been working on part of your project, things are in a messy state and you want to switch branches for a bit to work on something else. The problem is, you don’t want to do a commit of half-done work just so you can get back to this point later. The answer to this issue is the `git stash` command.
Expand Down

0 comments on commit 019a84e

Please sign in to comment.