Viewing history with Gitk
We saw earlier how we can view the history (the DAG) and visualize it with the use of git log
. However, as the history grows, the terminal representation of the history can be a bit cumbersome to navigate. Fortunately, there are a lot of graphical tools around Git, one of them being Gitk, which works on multiple platforms (Linux, Mac, and Windows).
This recipe will show you how to get started with Gitk.
Getting ready
Make sure you have Gitk installed:
$ which gitk /usr/local/bin/gitk
If nothing shows up, Gitk in not installed on your system, or at least is not available on your $PATH
.
Change the directory to the data-model
repository from the objects and DAG examples. Make sure the master branch is checked out and pointing to 34acc37
:
$ git checkout master && git reset --hard 34acc37
How to do it...
In the repository, run gitk --all &
to bring up the Gitk interface. You can also specify the commit range or branches you want similar to git log
or provide ...