Where can I find the source code of gitk?
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
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.
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
.