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
Copy file name to clipboardExpand all lines: en/book/10-git-in-other-environments/chapter10.asc
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,12 +16,12 @@ Some clients only expose only a carefully curated subset of Git functionality, i
16
16
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.
17
17
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.
18
18
19
-
==== +gitk+ and +git-gui+
19
+
==== `gitk` and `git-gui`
20
20
21
21
When you install Git, you also get its visual tools, `gitk` and `git-gui`.
22
22
23
23
`gitk` is a graphical history viewer.
24
-
Think of it like a powerful GUI shell over +git log+ and +git grep+.
24
+
Think of it like a powerful GUI shell over `git log` and `git grep`.
25
25
This is the tool to use when you're trying to find something that happened in the past, or visualize your project's history.
26
26
27
27
Gitk is easiest to invoke from the command-line.
@@ -65,11 +65,11 @@ You can move entire files between the two states by clicking on their icons, or
65
65
At top right is the diff view, which shows the changes for the currently-selected file.
66
66
You can stage individual hunks (or individual lines) by right-clicking in this area.
67
67
68
-
At the bottom right is the message and action area. Type your message into the text box and click ``Commit'' to do something similar to +git commit+.
68
+
At the bottom right is the message and action area. Type your message into the text box and click ``Commit'' to do something similar to `git commit`.
69
69
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.
70
70
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.
71
71
72
-
+gitk+ and +git-gui+ are examples of task-oriented tools.
72
+
`gitk` and `git-gui` are examples of task-oriented tools.
73
73
Each of them is tailored for a specific purpose (viewing history and creating commits, respectively), and omit the features not necessary for that task.
74
74
75
75
@@ -138,7 +138,7 @@ This works with all of Git's subcommands, command-line parameters, and remotes a
138
138
139
139
It's also useful to customize your prompt to show information about the current directory's Git repository.
140
140
This can be as simple or complex as you want, but there are generally a few key pieces of information that most people want, like the current branch, and the status of the working directory.
141
-
To add these to your prompt, just copy the `contrib/completion/git-prompt.sh` file from Git's source repository to your home directory, add something like this to your +.bashrc+:
141
+
To add these to your prompt, just copy the `contrib/completion/git-prompt.sh` file from Git's source repository to your home directory, add something like this to your `.bashrc`:
142
142
143
143
[source,shell]
144
144
-----
@@ -151,8 +151,8 @@ The `\w` means print the current working directory, the `\$` prints the `$` part
151
151
Now your bash prompt will look like <<git_bash>> when you're anywhere inside a Git-controlled project.
Both of these scripts come with helpful documentation; take a look at the contents of `git-completion.bash` and `git-prompt.sh` for more information.
158
158
@@ -205,21 +205,21 @@ image::images/zsh-oh-my.png[An example of an oh-my-zsh theme.]
205
205
206
206
=== Git in Powershell
207
207
208
-
The standard command-line terminal on Windows (+cmd.exe+) isn't really capable of a customized Git experience, but if you're using Powershell, you're in luck.
208
+
The standard command-line terminal on Windows (`cmd.exe`) isn't really capable of a customized Git experience, but if you're using Powershell, you're in luck.
209
209
A package called Posh-Git (TODO: URL) provides powerful tab-completion facilities, as well as an enhanced prompt to help you stay on top of your repostitory status. It looks like <<git_posh>>.
210
210
211
211
[[git_posh]]
212
212
.Powershell with Posh-git.
213
213
image::images/git-posh.png[Powershell with Posh-git.]
214
214
215
-
If you've installed GitHub for Windows, Posh-Git is included by default, and all you have to do is add these lines to your +profile.ps1+ (which is usually located in +C:\Users\<username>\Documents\WindowsPowerShell+):
215
+
If you've installed GitHub for Windows, Posh-Git is included by default, and all you have to do is add these lines to your `profile.ps1` (which is usually located in `C:\Users\<username>\Documents\WindowsPowerShell`):
216
216
217
217
[source,powershell]
218
218
-----
219
219
# TODO
220
220
-----
221
221
222
-
If you're not a GitHub for Windows user, just download a Posh-Git release from (TODO: URL), uncompress it to the +WindowsPowershell+ directory, and add this to your +profile.ps1+:
222
+
If you're not a GitHub for Windows user, just download a Posh-Git release from (TODO: URL), uncompress it to the `WindowsPowershell` directory, and add this to your `profile.ps1`:
0 commit comments