DRINKING THE GIT KOOL AID - GLASS 4 - GITK

There are occasions where a more graphical interface IS useful with Git.

Want to see a list of all change, what files changed and what was changed IN those files in one view?

Git provides gitk:

gitk - The git repository browser

Displays changes in a repository or a selected set of commits. This includes visualizing the commit graph, showing information related to each commit, and the files in the trees of each revision.

Open up your Git command line, navigate to a Git directory and type 'gitk'.

gitk

Within this pane you can see:

  • A list of all your changes
  • If you have tags those are highlighted
  • The SHA1 ID for each change
  • What files were changed in that revision
  • A simple diff view of the changes

There are also two 'search' functions:

  1. You can 'find' stuff. Say you want to find all commits by a coworker. Enter their Git username and select 'author' in the 'All fields' dropdown.
  2. You can also 'search' within those comments

Explore through each view, there is some hidden functionality - right click and see what pops up.

I don't use this view much and I'm sure you could get similar functionality via the command line and using something like grep, but for a quick 'who did what' gitk is very useful.

Published on Friday, July 05 2013    

COMMENT / SHARE

About

Jim is a Senior Applications Engineer working at Red Hat. He slso likes motorcycles and keeping his quadcopter out of trees.