|
1 | | -=== Graphical Interfaces |
| 1 | +=== Grafische Schnittstellen |
2 | 2 |
|
3 | 3 | (((GUIs)))(((Graphical tools))) |
4 | | -Git's native environment is in the terminal. |
5 | | -New features show up there first, and only at the command line is the full power of Git completely at your disposal. |
6 | | -But plain text isn't the best choice for all tasks; sometimes a visual representation is what you need, and some users are much more comfortable with a point-and-click interface. |
| 4 | +Die native Umgebung von Git bist das Terminal. |
| 5 | +Dort werden zuerst neue Funktionen implementiert, und nur über die Befehlszeile steht Ihnen die volle Leistung von Git zur Verfügung. |
| 6 | +Die Befehlszeile ist jedoch nicht für alle Aufgaben die beste Wahl. Manchmal benötigen Sie eine visuelle Darstellung, und einige Benutzer sind mit einer grafischen -Oberfläche viel besser vertraut. |
7 | 7 |
|
8 | | -It's important to note that different interfaces are tailored for different workflows. |
9 | | -Some clients expose only a carefully curated subset of Git functionality, in order to support a specific way of working that the author considers effective. |
10 | | -When viewed in this light, none of these tools can be called ``better'' than any of the others, they're simply more fit for their intended purpose. |
11 | | -Also note that there's nothing these graphical clients can do that the command-line client can't; the command-line is still where you'll have the most power and control when working with your repositories. |
| 8 | +Es ist wichtig zu beachten, dass unterschiedliche Schnittstellen auf unterschiedliche Workflows zugeschnitten sind. |
| 9 | +Einige Clients stellen nur eine sorgfältig zusammengestellte Teilmenge der Git-Funktionalität zur Verfügung, um eine bestimmte Arbeitsweise zu unterstützen, die der Autor für effektiv hält. |
| 10 | +Mit diesem Hintergrund kann keines dieser Tools als „besser“ bezeichnet werden als die anderen, sie sind einfach besser für den beabsichtigten Zweck geeignet. |
| 11 | +Beachten Sie auch, dass diese grafischen Clients nichts tun können, was der Befehlszeilenclient nicht kann. In der Befehlszeile haben Sie immer noch die größte Leistung und Kontrolle, wenn Sie mit Ihren Repositorys arbeiten. |
12 | 12 |
|
13 | | -==== `gitk` and `git-gui` |
| 13 | +==== `gitk` und `git-gui` |
14 | 14 |
|
15 | 15 | (((git commands, gitk)))(((git commands, gui)))(((gitk))) |
16 | | -When you install Git, you also get its visual tools, `gitk` and `git-gui`. |
| 16 | +Wenn Sie Git installieren, erhalten Sie auch die visuellen Tools `gitk` und `git-gui`. |
17 | 17 |
|
18 | | -`gitk` is a graphical history viewer. |
19 | | -Think of it like a powerful GUI shell over `git log` and `git grep`. |
20 | | -This is the tool to use when you're trying to find something that happened in the past, or visualize your project's history. |
| 18 | +`gitk` ist ein grafischer Verlaufsbetrachter. |
| 19 | +Stellen Sie sich das wie eine leistungsstarke GUI-Shell über `git log` und `git grep` vor. |
| 20 | +Dies ist das Tool, mit dem Sie versuchen, etwas zu finden, das in der Vergangenheit passiert ist, oder den Verlauf Ihres Projekts zu visualisieren. |
| 21 | +Dies ist das Tool, welches sie nutzen sollten, wenn sie versuchen, etwas zu finden, das in der Vergangenheit passiert ist, oder wenn sie den Verlauf Ihres Projekts visualisieren wollen. |
21 | 22 |
|
22 | | -Gitk is easiest to invoke from the command-line. |
23 | | -Just `cd` into a Git repository, and type: |
| 23 | +Gitk lässt sich am einfachsten über die Befehlszeile aufrufen. |
| 24 | +Geben Sie einfach eine CD in ein Git-Repository ein und geben Sie Folgendes ein: |
24 | 25 |
|
25 | 26 | [source,console] |
26 | 27 | ---- |
27 | 28 | $ gitk [git log options] |
28 | 29 | ---- |
29 | 30 |
|
30 | | -Gitk accepts many command-line options, most of which are passed through to the underlying `git log` action. |
31 | | -Probably one of the most useful is the `--all` flag, which tells gitk to show commits reachable from _any_ ref, not just HEAD. |
32 | | -Gitk's interface looks like this: |
| 31 | +Gitk akzeptiert viele Befehlszeilenoptionen, von denen die meisten an die zugrunde liegende Aktion `git Log` übergeben werden. |
| 32 | +Wahrscheinlich eines der nützlichsten ist das `--all`-Flag, das gitk anweist, Commits anzuzeigen, die von jedem Ref erreichbar sind, nicht nur von HEAD. |
| 33 | +Die Benutzeroberfläche von Gitk sieht folgendermaßen aus: |
33 | 34 |
|
34 | 35 | .The `gitk` history viewer. |
35 | | -image::images/gitk.png[The `gitk` history viewer.] |
| 36 | +image::images/gitk.png[Der `gitk` Verlaufsbetrachter.] |
36 | 37 |
|
37 | | -On the top is something that looks a bit like the output of `git log --graph`; each dot represents a commit, the lines represent parent relationships, and refs are shown as colored boxes. |
38 | | -The yellow dot represents HEAD, and the red dot represents changes that are yet to become a commit. |
39 | | -At the bottom is a view of the selected commit; the comments and patch on the left, and a summary view on the right. |
40 | | -In between is a collection of controls used for searching history. |
| 38 | +Im oberen Teil sieht man etwas, das ein bisschen wie die Ausgabe von `git log --graph` aussieht. Jeder Punkt steht für ein Commit, die Linien für übergeordnete Beziehungen und Refs werden als farbige Kästchen angezeigt. |
| 39 | +Der gelbe Punkt steht für HEAD und der rote Punkt für Änderungen, die noch nicht festgeschrieben wurden. |
| 40 | +Unten sehen Sie eine Ansicht des ausgewählten Commits. Die Kommentare und Patches auf der linken Seite und eine zusammenfassende Ansicht auf der rechten Seite. |
| 41 | +Dazwischen befindet sich eine Sammlung von Steuerelementen, die zum Durchsuchen des Verlaufs verwendet werden können. |
41 | 42 |
|
42 | | -`git-gui`, on the other hand, is primarily a tool for crafting commits. |
43 | | -It, too, is easiest to invoke from the command line: |
| 43 | +`git-gui` hingegen ist in erster Linie ein Werkzeug zum Erstellen von Commits. |
| 44 | +Es kann ebenfalls sehr einfach über die Befehlszeile aufgerufen werden: |
44 | 45 |
|
45 | 46 | [source,console] |
46 | 47 | ----- |
47 | 48 | $ git gui |
48 | 49 | ----- |
49 | 50 |
|
50 | | -And it looks something like this: |
| 51 | +Es sieht in etwa wo aus: |
51 | 52 |
|
52 | 53 | .The `git-gui` commit tool. |
53 | | -image::images/git-gui.png[The `git-gui` commit tool.] |
| 54 | +image::images/git-gui.png[Das `git-gui` commit Werkzeug.] |
54 | 55 |
|
55 | | -On the left is the index; unstaged changes are on top, staged changes on the bottom. |
56 | | -You can move entire files between the two states by clicking on their icons, or you can select a file for viewing by clicking on its name. |
| 56 | +Links ist der Index. „Unstage“ Änderungen befinden sich oben, „staged“ Änderungen unten. |
| 57 | +Sie können ganze Dateien zwischen den beiden Status verschieben, indem Sie auf deren Symbole klicken. Weiterhin können Sie eine Datei zum Anzeigen auswählen, indem Sie auf ihren Namen klicken. |
57 | 58 |
|
58 | | -At top right is the diff view, which shows the changes for the currently-selected file. |
59 | | -You can stage individual hunks (or individual lines) by right-clicking in this area. |
| 59 | +Oben rechts befindet sich die Diff-Ansicht, in der die Änderungen für die aktuell ausgewählte Datei angezeigt werden. |
| 60 | +Sie können einzelne Bereiche (oder einzelne Linien) stagen, indem Sie mit der rechten Maustaste in diesen Bereich klicken. |
60 | 61 |
|
61 | | -At the bottom right is the message and action area. |
62 | | -Type your message into the text box and click ``Commit'' to do something similar to `git commit`. |
63 | | -You can also choose to amend the last commit by choosing the ``Amend'' radio button, which will update the ``Staged Changes'' area with the contents of the last commit. |
64 | | -Then you can simply stage or unstage some changes, alter the commit message, and click ``Commit'' again to replace the old commit with a new one. |
| 62 | +Unten rechts befindet sich der Nachrichten- und Aktionsbereich. |
| 63 | +Geben Sie Ihre Nachricht in das Textfeld ein und klicken Sie auf „Commit“, um etwas Ähnliches wie `git commit` zu tun. |
| 64 | +Sie können das letzte Commit auch ändern, indem Sie das Optionsfeld „Ändern“ aktivieren, um den Bereich „Staged Changes“ mit dem Inhalt des letzten Commits zu aktualisieren. |
| 65 | +Anschließend können Sie einfach einige Änderungen aktivieren oder deaktivieren, die Commit-Nachricht ändern und erneut auf „Commit“ klicken, um den alte commit durch einen neuen zu ersetzen. |
65 | 66 |
|
66 | | -`gitk` and `git-gui` are examples of task-oriented tools. |
67 | | -Each of them is tailored for a specific purpose (viewing history and creating commits, respectively), and omit the features not necessary for that task. |
| 67 | +`gitk` und `git-gui` sind Beispiele für aufgabenorientierte Tools. |
| 68 | +Jedes von ihnen ist auf einen bestimmten Zweck zugeschnitten (Anzeigen des Verlaufs bzw. Erstellen von Commits) und lässt die für diese Aufgabe nicht erforderlichen Funktionen aus. |
68 | 69 |
|
69 | | -==== GitHub for macOS and Windows |
| 70 | +==== GitHub für macOS und Windows |
70 | 71 |
|
71 | 72 | (((GitHub for macOS)))(((GitHub for Windows))) |
72 | | -GitHub has created two workflow-oriented Git clients: one for Windows, and one for macOS. |
73 | | -These clients are a good example of workflow-oriented tools – rather than expose _all_ of Git's functionality, they instead focus on a curated set of commonly-used features that work well together. |
74 | | -They look like this: |
| 73 | +GitHub hat zwei Workflow-orientierte Git-Clients erstellt: einen für Windows und einen für MacOS. |
| 74 | +Diese Clients sind ein gutes Beispiel für Workflow-orientierte Tools. Anstatt alle Funktionen von Git zu implementieren, konzentrieren sie sich stattdessen auf eine Reihe häufig verwendeter Funktionen, die gut zusammenarbeiten. |
| 75 | +Sie sehen so aus: |
75 | 76 |
|
76 | 77 | .GitHub for macOS. |
77 | | -image::images/github_mac.png[GitHub for macOS.] |
| 78 | +image::images/github_mac.png[GitHub für macOS.] |
78 | 79 |
|
79 | 80 | .GitHub for Windows. |
80 | | -image::images/github_win.png[GitHub for Windows.] |
| 81 | +image::images/github_win.png[GitHub für Windows.] |
81 | 82 |
|
82 | | -They are designed to look and work very much alike, so we'll treat them like a single product in this chapter. |
83 | | -We won't be doing a detailed rundown of these tools (they have their own documentation), but a quick tour of the ``changes'' view (which is where you'll spend most of your time) is in order. |
| 83 | +Sie sind so konzipiert, dass sie sehr ähnlich aussehen und funktionieren. Daher werden wir sie in diesem Kapitel wie ein einziges Produkt behandeln. |
| 84 | +Wir werden keinen detaillierten Überblick über diese Tools geben (sie haben ihre eigene Dokumentation), aber kurz auf die Ansicht „Änderungen“ (in der Sie die meiste Zeit verbringen werden) werden wir eingehen. |
84 | 85 |
|
85 | | -* On the left is the list of repositories the client is tracking; you can add a repository (either by cloning or attaching locally) by clicking the ``+'' icon at the top of this area. |
86 | | -* In the center is a commit-input area, which lets you input a commit message, and select which files should be included. |
87 | | - (On Windows, the commit history is displayed directly below this; on macOS, it's on a separate tab.) |
88 | | -* On the right is a diff view, which shows what's changed in your working directory, or which changes were included in the selected commit. |
89 | | -* The last thing to notice is the ``Sync'' button at the top-right, which is the primary way you interact over the network. |
| 86 | +* Auf der linken Seite befindet sich die Liste der Repositorys, die der Client verfolgt. Sie können ein Repository hinzufügen (entweder durch Klonen oder lokales Anhängen), indem Sie oben in diesem Bereich auf das Symbol "+" klicken. |
| 87 | +* In der Mitte befindet sich ein Commit-Eingabebereich, in den Sie eine Commit-Nachricht eingeben und auswählen können, welche Dateien enthalten sein sollen. |
| 88 | + (Unter Windows wird die Commit-Historie direkt darunter angezeigt. Unter macOS befindet sie sich auf einer separaten Registerkarte.) |
| 89 | +* Auf der rechten Seite befindet sich eine Diff-Ansicht, die zeigt, was in Ihrem Arbeitsverzeichnis geändert wurde oder welche Änderungen im ausgewählten Commit enthalten waren. |
| 90 | +* Zu guter Letzt gibt es oben rechts die Schaltfläche „Synchronisieren“. Hierrüber werden sie primär über das Netzwerk interagieren. |
90 | 91 |
|
91 | 92 | [NOTE] |
92 | 93 | ==== |
93 | | -You don't need a GitHub account to use these tools. |
94 | | -While they're designed to highlight GitHub's service and recommended workflow, they will happily work with any repository, and do network operations with any Git host. |
| 94 | +Sie benötigen kein GitHub-Konto, um diese Tools verwenden zu können. |
| 95 | +Das Tool is designed, um Githubs Services und deren empfohlenen Workflow zu nuten, sie können damit jedoch problemlos mit jedem Repository arbeiten und Netzwerkoperationen mit jedem Git-Host ausführen. |
95 | 96 | ==== |
96 | 97 |
|
97 | 98 | ===== Installation |
98 | 99 |
|
99 | | -GitHub for Windows can be downloaded from https://windows.github.com[], and GitHub for macOS from https://mac.github.com[]. |
100 | | -When the applications are first run, they walk you through all the first-time Git setup, such as configuring your name and email address, and both set up sane defaults for many common configuration options, such as credential caches and CRLF behavior. |
| 100 | +GitHub für Windows kann von https://windows.github.com[] und GitHub für macOS von https://mac.github.com[] heruntergeladen werden. |
| 101 | +Wenn die Anwendungen zum ersten Mal ausgeführt werden, werden Sie durch alle erstmaligen Git-Einstellungen geführt, z. B. durch die Konfiguration Ihres Namens und Ihrer E-Mail-Adresse. Beide richten vernünftige Standardeinstellungen für viele gängige Konfigurationsoptionen ein, z. B. Caches für Anmeldeinformationen und CRLF-Verhalten. |
101 | 102 |
|
102 | | -Both are ``evergreen'' – updates are downloaded and installed in the background while the applications are open. |
103 | | -This helpfully includes a bundled version of Git, which means you probably won't have to worry about manually updating it again. |
104 | | -On Windows, the client includes a shortcut to launch PowerShell with Posh-git, which we'll talk more about later in this chapter. |
| 103 | +Beides sind „Evergreen“-Programme – Alle Updates werden automatisch heruntergeladen und im Hintergrund installiert, sobald die Anwendungen geöffnet sind. |
| 104 | +Dies beinhaltet eine gebündelte Version von Git, was bedeutet, dass Sie sich wahrscheinlich nicht darum kümmern müssen, sie manuell erneut zu aktualisieren. |
| 105 | +Unter Windows enthält der Client eine Verknüpfung zum Starten von PowerShell mit Posh-git, auf die wir später in diesem Kapitel näher eingehen werden. |
105 | 106 |
|
106 | | -The next step is to give the tool some repositories to work with. |
107 | | -The client shows you a list of the repositories you have access to on GitHub, and can clone them in one step. |
108 | | -If you already have a local repository, just drag its directory from the Finder or Windows Explorer into the GitHub client window, and it will be included in the list of repositories on the left. |
| 107 | +Der nächste Schritt besteht darin, dem Tool einige Repositorys zur Verfügung zu stellen, mit denen es arbeiten kann. |
| 108 | +Der Client zeigt Ihnen eine Liste der Repositorys, auf die Sie auf GitHub zugreifen können, und kann sie in einem Schritt klonen. |
| 109 | +Wenn Sie bereits über ein lokales Repository verfügen, ziehen Sie dessen Verzeichnis einfach aus dem Finder oder Windows Explorer in das GitHub-Clientfenster. Es wird dann in die Liste der Repositorys auf der linken Seite aufgenommen. |
109 | 110 |
|
110 | | -===== Recommended Workflow |
| 111 | +===== Empfohlener Workflow |
111 | 112 |
|
112 | | -Once it's installed and configured, you can use the GitHub client for many common Git tasks. |
113 | | -The intended workflow for this tool is sometimes called the ``GitHub Flow.'' |
114 | | -We cover this in more detail in <<ch06-github#ch06-github_flow>>, but the general gist is that (a) you'll be committing to a branch, and (b) you'll be syncing up with a remote repository fairly regularly. |
| 113 | +Sobald es installiert und konfiguriert ist, können Sie den GitHub-Client für viele gängige Git-Aufgaben verwenden. |
| 114 | +Der beabsichtigte Workflow für dieses Tool wird manchmal als „GitHub Flow“ bezeichnet. |
| 115 | +Wir behandeln dies ausführlicher in <<ch06-github#ch06-github_flow>>, aber der Kern des Ganzen ist, dass (a) Sie sich auf einen Branch festlegen und (b) sich mit einer remote Repository regelmäßig synchronisieren. |
115 | 116 |
|
116 | | -Branch management is one of the areas where the two tools diverge. |
117 | | -On macOS, there's a button at the top of the window for creating a new branch: |
| 117 | +Das Branchmanagement ist einer der Bereiche, in denen sich die beiden Tools unterscheiden. |
| 118 | +Unter macOS gibt es oben im Fenster eine Schaltfläche zum Erstellen eines neuen Branches: |
118 | 119 |
|
119 | 120 | .``Create Branch'' button on macOS. |
120 | | -image::images/branch_widget_mac.png[``Create Branch'' button on macOS.] |
| 121 | +image::images/branch_widget_mac.png[„Create Branch“ Knopf auf macOS.] |
121 | 122 |
|
122 | | -On Windows, this is done by typing the new branch's name in the branch-switching widget: |
| 123 | +Unter Windows wird dazu der Name des neuen Branches in das Branchwechsel-Widget eingegeben: |
123 | 124 |
|
124 | 125 | .Creating a branch on Windows. |
125 | | -image::images/branch_widget_win.png[Creating a branch on Windows.] |
| 126 | +image::images/branch_widget_win.png[Einen Branch auf Windows erstellen.] |
126 | 127 |
|
127 | | -Once your branch is created, making new commits is fairly straightforward. |
128 | | -Make some changes in your working directory, and when you switch to the GitHub client window, it will show you which files changed. |
129 | | -Enter a commit message, select the files you'd like to include, and click the ``Commit'' button (ctrl-enter or ⌘-enter). |
| 128 | +Sobald Ihre Branch erstellt ist, ist das Erstellen neuer Commits ziemlich einfach. |
| 129 | +Nehmen Sie einige Änderungen in Ihrem Arbeitsverzeichnis vor. Wenn Sie zum GitHub-Client-Fenster wechseln, wird angezeigt, welche Dateien geändert wurden. |
| 130 | +Geben Sie eine Commitnachricht ein, wählen Sie die Dateien aus, die Sie einschließen möchten, und klicken Sie auf die Schaltfläche „Commit“ (Strg-Eingabe oder ⌘-Eingabe). |
130 | 131 |
|
131 | | -The main way you interact with other repositories over the network is through the ``Sync'' feature. |
132 | | -Git internally has separate operations for pushing, fetching, merging, and rebasing, but the GitHub clients collapse all of these into one multi-step feature. |
133 | | -Here's what happens when you click the Sync button: |
| 132 | +Die Hauptmethode für die Interaktion mit anderen Repositorys über das Netzwerk ist die Funktion „Synchronisieren“. |
| 133 | +Git verfügt intern über separate Vorgänge zum Verschieben, Abrufen, Zusammenführen und Rebasen. Die GitHub-Clients reduzieren jedoch alle diese Vorgänge zu einer mehrstufigen Funktion. |
| 134 | +Folgendes passiert, wenn Sie auf die Schaltfläche „Synchronisieren“ klicken: |
134 | 135 |
|
135 | 136 | . `git pull --rebase`. |
136 | | - If this fails because of a merge conflict, fall back to `git pull --no-rebase`. |
| 137 | + Wenn das wegen eines merge Konfliktes fehlschlägt, gehe zurück zu `git pull --no-rebase`. |
137 | 138 | . `git push`. |
138 | 139 |
|
139 | | -This is the most common sequence of network commands when working in this style, so squashing them into one command saves a lot of time. |
| 140 | +Dies ist die häufigste Folge von Netzwerkbefehlen, wenn Sie auf diese Art arbeiten. Wenn Sie sie also zu einem Befehl zusammenfassen, sparen Sie viel Zeit. |
140 | 141 |
|
141 | | -===== Summary |
| 142 | +===== Zusammenfassung |
142 | 143 |
|
143 | | -These tools are very well-suited for the workflow they're designed for. |
144 | | -Developers and non-developers alike can be collaborating on a project within minutes, and many of the best practices for this kind of workflow are baked into the tools. |
145 | | -However, if your workflow is different, or you want more control over how and when network operations are done, we recommend you use another client or the command line. |
| 144 | +Diese Tools eignen sich sehr gut für den Workflow, für den sie entwickelt wurden. |
| 145 | +Entwickler und Nichtentwickler können innerhalb von Minuten an einem Projekt zusammenarbeiten, und viele der Best Practices für diese Art von Workflow sind in die Tools integriert. |
| 146 | +Wenn Ihr Workflow jedoch anders ist oder Sie mehr Kontrolle darüber haben möchten, wie und wann Netzwerkvorgänge ausgeführt werden, empfehlen wir Ihnen, einen anderen Client oder die Befehlszeile zu verwenden. |
146 | 147 |
|
147 | 148 |
|
148 | | -==== Other GUIs |
| 149 | +==== Andere GUIs |
149 | 150 |
|
150 | | -There are a number of other graphical Git clients, and they run the gamut from specialized, single-purpose tools all the way to apps that try to expose everything Git can do. |
151 | | -The official Git website has a curated list of the most popular clients at https://git-scm.com/downloads/guis[]. |
152 | | -A more comprehensive list is available on the Git wiki site, at https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Graphical_Interfaces[]. |
| 151 | +Es gibt eine Reihe anderer grafischer Git-Clients, die von spezialisierten Einzweck-Tools bis hin zu Apps reichen, die versuchen, alles zu beinhalten, was Git kann. |
| 152 | +Die offizielle Git-Website enthält eine kuratierte Liste der beliebtesten Kunden unter https://git-scm.com/downloads/guis[]. |
| 153 | +Eine umfassendere Liste finden Sie auf der Git-Wiki-Website unter https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Graphical_Interfaces[]. |
0 commit comments