Note in order to run
gitk
from terminal you need to have a Desktop GUI environment (for example VNC).
gitk
is a graphical history viewer. Think of it like a powerful GUI shell over git log and git grep. This is the tool to use when you’re trying to find something that happened in the past, or visualize your project’s history
Install gitk
For CentOS and RedHat:
1 | yum install -y gitk |
Usage
gitk
is easy to invoke from the command-line. Just cd
into your target git repository, and type:
1 | gitk |
Then a dedicated GUI will be launched for you:
You can get a brief usage introduction from man gitk
, for example, if I want to see the commit history of hello.sh
1 | gitk <path to file>/hello.sh |
Show all branches:
1 | gitk --all |