10

gitk seems to have very nice interface design and whatnot. I really want to explore its source code. So where can I find it?

By gitk, I mean the one to view the repository history of git.

dacongy
  • 2,366
  • 3
  • 27
  • 45

3 Answers3

5

gitk lives in a subfolder of git's official repository.

It's written in wish/Tcl. Its folder (at time of writing) can be found at https://github.com/git/git/blob/master/gitk-git, mostly contained in a single file called gitk.

mwfearnley
  • 2,377
  • 1
  • 27
  • 29
3

When dealing with Open Source get it from the horses mouth - gitk is now part of the git distribution.

http://git-scm.com/download

git clone git://github.com/gitster/git.git
Adrian Cornish
  • 20,973
  • 11
  • 50
  • 74
  • The page seems to have changed the official repo URL at some point in the last few years - it now points to https://github.com/git/git. /gitster/git still seems to be in sync though. – mwfearnley Apr 20 '15 at 13:37
1

gitk is its own source code, since it is written in tcl and tcl is a scripting language. Just open /usr/bin/gitk with the text editor of your choice. It seems to be contained in a single file.

gustavohenke
  • 38,209
  • 13
  • 113
  • 120