Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've never seen anything specifically for gitk. Here's a stab at it, from a "how does it work" point of view. Knowing the commands that are behind everything (or at least generally equivalent) helps learn to use command-line tools more easily, and also shows you where to look in documentation to understand gitk better!</p> <h2>File menu</h2> <p>This has changed somewhat over the last few major versions - I'm describing the current state.</p> <ul> <li><p>update and reload: This is probably the most confusing thing. Reload refreshes everything as if you started the program over with the same configuration. This means if a branch has been removed/rebased, if some commits are now dangling, you don't see them anymore. Update, on the other hand, refreshes all the information, but still shows all commits that were previously shown. This is an excellent thing to use if you're rebasing and want to make sure you didn't mess up - you can see both the original and rebased versions.</p></li> <li><p>references: pretty obvious. References include tags and branches (which may be remote). You can reread them, and list to click a particular one to show it in the history.</p></li> </ul> <h2>Views</h2> <p>As the <a href="http://www.kernel.org/pub/software/scm/git/docs/gitk.html" rel="noreferrer">man page</a> says, gitk takes <a href="http://www.kernel.org/pub/software/scm/git/docs/git-rev-list.html" rel="noreferrer">git-rev-list</a> options to help specify what history should be shown. These can also be set interactively in the "view" menu. The man page is an excellent place to find more information about the ways you can control views (it's mostly in the commit limiting section). If you've looked at <code>git-log</code> before, you'll have seen a lot of this.</p> <h2>Help</h2> <p>There's a list of keybindings here! Sweet.</p> <h2>Context menu</h2> <p>This presents several common git porcelain commands, generally in a common/default mode of operation. Listing them will at least help you find the right documentation to understand what they do, if you don't already!</p> <ul> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-diff.html" rel="noreferrer">git-diff</a> (Diff this &lt;-> selected</li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html" rel="noreferrer">git-format-patch</a> (make patch)</li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-tag.html" rel="noreferrer">git-tag</a> (create tag)</li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-diff-tree.html" rel="noreferrer">git-diff-tree</a> (write commit to file, rarely used)</li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-branch.html" rel="noreferrer">git-branch</a></li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-cherry-pick.html" rel="noreferrer">git-cherry-pick</a></li> <li><a href="http://www.kernel.org/pub/software/scm/git/docs/git-reset.html" rel="noreferrer">git-reset</a> (reset branch to here) This prompts you for soft, mixed, or hard, with a brief reminder of what each does. Longer description on the man page, but of course you have to understand the concept of the index to really get it.</li> </ul> <p>The "mark a commit" and related commands should be self-explanatory at this point.</p> <p>In the context menu for a branch, we have <a href="http://www.kernel.org/pub/software/scm/git/docs/git-checkout.html" rel="noreferrer">git-checkout</a> and the <code>-d</code> (delete) mode of git-branch.</p> <h2>Middle section</h2> <ul> <li><p>SHA1 ID: the hash of the current commit. Very useful for copy/paste into a terminal to perform an action on a given commit you used gitk to find. You can also paste hashes into here.</p></li> <li><p>Forward/back buttons, row number... obvious!</p></li> <li><p>Find! The options here are again pretty self-explanatory, but for everyone's education, they're analogous to <a href="http://www.kernel.org/pub/software/scm/git/docs/git-log.html" rel="noreferrer">git-log</a> parameters: "containing" is <code>--grep</code>, "touching paths" is the arguments, and adding/removing string is <code>-S</code> (pickaxe).</p></li> </ul> <h2>Message/diff pane</h2> <p>Here we have the commit message along with git-diff's output - this is something like using <code>git-log -p</code>, with a little extra:</p> <ul> <li><p>"Branches" is equivalent to <code>git branch -a --contains=&lt;commit&gt;</code></p></li> <li><p>"Precedes"/"Follows" is equivalent to <code>git describe [--contains] &lt;commit&gt;</code> (<a href="http://www.kernel.org/pub/software/scm/git/docs/git-describe.html" rel="noreferrer">git-describe</a>)</p></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload