Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 3 #8

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions book/03-git-branching/1-git-branching.asc
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
== Git Branching

(((branches)))
Nearly every VCS has some form of branching support.
Branching means you diverge from the main line of development and continue to do work without messing with that main line.
In many VCS tools, this is a somewhat expensive process, often requiring you to create a new copy of your source code directory, which can take a long time for large projects.
Nahezu jedes VCS unterstützt eine Form von Branching.
Branching bedeutet, dass Sie von der Hauptlinie der Entwicklung abzweigen und Ihre Arbeit fortsetzen, ohne an der Hauptlinie herumzubasteln.
Bei vielen VCS ist das ein etwas aufwendiger Prozess, welcher häufig von Ihnen verlangt, eine neue Kopie des kompletten Quellcodeverzeichnisses anzulegen, was bei großen Projekten viel Zeit in Anspruch nehmen kann.

Some people refer to Git's branching model as its ``killer feature,'' and it certainly sets Git apart in the VCS community.
Why is it so special?
The way Git branches is incredibly lightweight, making branching operations nearly instantaneous, and switching back and forth between branches generally just as fast.
Unlike many other VCSs, Git encourages workflows that branch and merge often, even multiple times in a day.
Understanding and mastering this feature gives you a powerful and unique tool and can entirely change the way that you develop.
Manche Leute bezeichnen Gits Branching-Modell als dessen ``Killerfeature'', was Git zweifellos vom Rest der VCS-Community abhebt.
Was ist das Besondere daran?
Die Art und Weise, wie Git Branches anlegt, ist unglaublich leichtgewichtig, wodurch Branch-Operationen nahezu verzögerungsfrei ausgeführt werden und auch das Hin- und Herschalten zwischen einzelnen Entwicklungszweigen meist genauso schnell abläuft.
Im Gegensatz zu anderen VCS ermutigt Git zu einer Arbeitsweise mit häufigem Branching und Merging, sogar mehrmals am Tag.
Wenn Sie diese Funktion verstehen und beherrschen, besitzen Sie ein mächtiges und einmaliges Werkzeug, welches Ihre Art zu entwickeln vollständig verändern kann.

include::sections/nutshell.asc[]

Expand All @@ -24,9 +24,9 @@ include::sections/remote-branches.asc[]

include::sections/rebasing.asc[]

=== Summary
=== Zusammenfassung

We've covered basic branching and merging in Git.
You should feel comfortable creating and switching to new branches, switching between branches and merging local branches together.
You should also be able to share your branches by pushing them to a shared server, working with others on shared branches and rebasing your branches before they are shared.
Next, we'll cover what you'll need to run your own Git repository-hosting server.
Wir haben einfaches Branching und Merging mit Git behandelt.
Es sollte Ihnen leicht fallen, neue Branches zu erstellen und zu diesen zu wechseln, zwischen bestehenden Branches zu wechseln und lokale Branches zusammenzuführen.
Außerdem sollten Sie in der Lage sein, Ihre Branches auf einem gemeinsam genutzten Server bereitzustellen, mit anderen an gemeinsam genutzten Branches zu arbeiten und Ihre Branches zu rebasen, bevor Sie diese bereitstellen.
Als Nächstes werden wir behandeln, was Sie benötigen, um einen eigenen Git-Repository-Hosting-Server zu betreiben.
204 changes: 100 additions & 104 deletions book/03-git-branching/sections/basic-branching-and-merging.asc

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions book/03-git-branching/sections/branch-management.asc
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[[_branch_management]]
=== Branch Management
=== Branch-Management

(((branches, managing)))
Now that you've created, merged, and deleted some branches, let's look at some branch-management tools that will come in handy when you begin using branches all the time.
Nachdem Sie nun einige Branches erzeugt, zusammengeführt und gelöscht haben, lassen Sie uns jetzt einige Werkzeuge für das Branch-Management betrachten, die sich als sehr nützlich erweisen werden, wenn Sie erst einmal damit anfangen, andauernd Branches zu benutzen.

The `git branch` command does more than just create and delete branches.(((git commands, branch)))
If you run it with no arguments, you get a simple listing of your current branches:
Die Anweisung `git branch` kann noch mehr, als Branches zu erzeugen und zu löschen.(((git commands, branch)))
Wenn Sie die Anweisung ohne Argumente ausführen, bekommen Sie eine einfache Auflistung Ihrer aktuellen Branches:

[source,console]
----
Expand All @@ -15,9 +15,9 @@ $ git branch
testing
----

Notice the `*` character that prefixes the `master` branch: it indicates the branch that you currently have checked out (i.e., the branch that `HEAD` points to).
This means that if you commit at this point, the `master` branch will be moved forward with your new work.
To see the last commit on each branch, you can run `git branch -v`:
Beachten Sie das `*`-Zeichen, dass dem `master`-Branch vorangestellt ist: es zeigt an, welchen Branch Sie gegenwärtig ausgecheckt haben (bzw. den Branch, auf den `HEAD` zeigt).
Wenn Sie zu diesem Zeitpunkt einen Commit durchführen, wird der `master`-Branch durch Ihre neue Änderung vorwärts bewegt.
Um sich den letzten Commit auf jedem Branch anzeigen zu lassen, können Sie die Anweisung `git branch -v` ausführen:

[source,console]
----
Expand All @@ -27,8 +27,8 @@ $ git branch -v
testing 782fd34 add scott to the author list in the readmes
----

The useful `--merged` and `--no-merged` options can filter this list to branches that you have or have not yet merged into the branch you're currently on.
To see which branches are already merged into the branch you're on, you can run `git branch --merged`:
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.
Um zu sehen, welche Branches schon mit dem Branch zusammengeführt wurden, auf dem sie gerade sind, können Sie die Anweisung `git branch --merged` ausführen:

[source,console]
----
Expand All @@ -37,19 +37,19 @@ $ git branch --merged
* master
----

Because you already merged in `iss53` earlier, you see it in your list.
Branches on this list without the `*` in front of them are generally fine to delete with `git branch -d`; you've already incorporated their work into another branch, so you're not going to lose anything.
Da Sie den Branch `iss53` schon früher einfließen lassen haben, sehen Sie ihn in Ihrer Liste.
Branches auf dieser Liste ohne vorangestelltes `*` können für gewöhnlich einfach mit der Anweisung `git branch -d` gelöscht werden; Sie haben deren Änderungen bereits zu einem anderen Branch hinzugefügt, sodass Sie nichts verlieren würden.

To see all the branches that contain work you haven't yet merged in, you can run `git branch --no-merged`:
Um alle Branches zu sehen, welche Änderungen enhalten, die Sie noch nicht integriert haben, können Sie die Anweisung `git branch --no-merged` ausführen:

[source,console]
----
$ git branch --no-merged
testing
----

This shows your other branch.
Because it contains work that isn't merged in yet, trying to delete it with `git branch -d` will fail:
Dies zeigt Ihren anderen Branch.
Da er Änderungen enthält, die noch nicht integriert wurden, würde der Versuch, ihn mit `git branch -d` zu löschen, fehlschlagen:

[source,console]
----
Expand All @@ -58,4 +58,4 @@ error: The branch 'testing' is not fully merged.
If you are sure you want to delete it, run 'git branch -D testing'.
----

If you really do want to delete the branch and lose that work, you can force it with `-D`, as the helpful message points out.
Wenn Sie den Branch tatsächlich löschen und damit diese Änderungen verlieren wollen, können Sie die Anweisung mit der Option `-D` verstärken, worauf auch die hilfreiche Nachricht hinweist.
Loading