@@ -9,6 +9,11 @@ does really useful things that just cannot be done in a CLI.
9
9
Sadly, it is woefully undocumented. Scratch that, it's almost * completely*
10
10
undocumented.
11
11
12
+ [ Update 2020-06-28: I just found [ Exploring
13
+ gitk] ( https://www.youtube.com/watch?v=BuDYATyhl0U ) , which is pretty neat too.
14
+ A lot of things in gitk are better explained in video than text so be sure to
15
+ check that out also.]
16
+
12
17
This is my attempt to do something about that. Strictly speaking, you can
13
18
explore the UI and find all these features yourself, and indeed, if you find
14
19
any that are not listed here, please
[ email me
] ( mailto:[email protected] ) .
@@ -46,14 +51,13 @@ All these are from the commit list (the top pane):
46
51
you the old ones* . It is most useful after operations like rebase,
47
52
because you can compare the previous branch head with the new one.
48
53
49
- (` Ctrl -F5` , on the other hand, is a total refresh, throwing away
54
+ (` Shift -F5` , on the other hand, is a total refresh, throwing away
50
55
everything that was previously shown.)
51
56
52
- * list/choose references: to quickly go to a particular reference, hit ` F2 ` .
57
+ * list references: to quickly go to a particular reference, hit ` F2 ` .
53
58
If there are too many, you can specify a glob pattern in the box at the
54
- bottom to subset the list. Clicking on a reference takes the main window
55
- to that reference. The list window will stay open so you can click on
56
- other refs.
59
+ bottom to subset the list. Clicking on a reference jumps to that
60
+ reference.
57
61
58
62
# browsing the commit list (top pane)
59
63
@@ -100,6 +104,10 @@ change the view to show that commit, so while examining this "diff", stick to
100
104
101
105
# searching for commits
102
106
107
+ Searching for commits is done by typing something in the search box just below
108
+ the SHA ID. (The "Search" box on the * next* line is to search for text within
109
+ a commit diff; that's not the one we want, despite its name!)
110
+
103
111
Here're some ways to search for commits. The commits that result will become
104
112
highlighted in bold, so you can see them in the context of their surrounding
105
113
changes. You can navigate between matches using the shift-up/down-arrow keys.
@@ -169,8 +177,16 @@ There are several ways to navigate the tree quickly.
169
177
the focus onto the SHA1 field, then type in the first few characters of
170
178
the SHA you want.
171
179
172
- If you click in the field with a mouse, it deselects the text within the
173
- field, and (for some reason), shift-select is disabled so you have to hold
174
- down the delete key to delete the entire field before you start typing in
175
- the new hash. Irritating, but it's only the mouse use, not keyboard use,
176
- so it's ok, I guess.
180
+ On Linux, you can grab the current SHA into a terminal command line by
181
+ using the middle-click.
182
+
183
+ * Just above the diff view are some additional widgets. One of them is a
184
+ drop-down called ` Line diff ` . Be sure to try the ` Color words ` diff,
185
+ especially when long lines have had just one or two changes.
186
+
187
+ Similarly, the "Ignore space change" checkbox is useful when blocks have
188
+ indentation changes that cause the normal diff to look a lot noisier than
189
+ it should be.
190
+
191
+ * Finally, for a great birds-eye view of all the ** refs** in a repo (but not
192
+ the commits between them), try ` gitk --all --simplify-by-decoration ` .
0 commit comments