What is gitk?
What is gitk?
gitk
is a graphical repository browser for Git. It is one of the earliest GUI tools built for Git and is included with most Git installations. It helps developers visualize and navigate the commit history of a Git repository.
Gitk is a repository browser. It can be used as a commit viewer for Git. This program is free to use and redistribute under the terms of the GNU General Public License.
Features of gitk
Some of the features are as follows:
- Graphical Commit History: Displays a visual representation of the commit tree.
- Branch Tracking: Shows different branches and merges clearly.
- Search: Allows searching by commit message, author, file, or content.
- Diff Viewer: Lets you view the changes introduced by each commit.
- File History: You can trace changes to specific files over time.
How to launch?
You can visualize the git repository commit history easily using this program. You can launch it command line using the git bash. Navigate to the git repository directory and issue the below command.
To open gitk
for the current repository:
$ gitk
gitk displays changes in a particular repository or a selected set of commits. You can use it to visualize the commit-graph, showing information related to each commit, and the files in the trees of each revision.
We can use –all switch to show all refs( branches,tags..etc)
$ gitk –all
Note that gitk will throw an error message if the present directory is not a valid git repository as shown in the picture.
Gitk Preferences
Gitk preferences can be set using the preferences windows. To launch the edit windows use Edit >> Preferences menu option. These preferences can be used to customize gitk tool. Using this window you can set a bunch of options, fonts, and colors to the gitk window.
More options and information about gitk can be found at:
- https://git-scm.com/docs/gitk