Question

Gitk is a neat tool, but it doesn't show any visual clue as for which repository you are actually in. When I open multiple gitk windows, I always have to stop and think which one goes with each repo.

As fas as I know, there is no way to provide different .gitk config files for each repo. Has anybody some kind of trick for this?

EDIT: Actually the name of the repo is shown in the title bar, XMonad was hiding it for me. The question of multiple config files still stands, though. (What I'd ideally like is a way to set Preferences > Interface color, so that each window has a different color)

Was it helpful?

Solution

Here's a trick in the form of a patch to gitk (I'm using git version 1.7.4.1):

11486c11486,11490
< catch {source ~/.gitk}
---
> if { [file exists ".gitk" ] } {
>     catch {source .gitk}
> } else {
>     catch {source ~/.gitk}
> }

EDIT: To also save to the local gitk file:

around 2716
< file rename -force "~/.gitk-new" "~/.gitk"
---
> if { [file exists ".gitk" ] } {
>     file rename -force "~/.gitk-new" ".gitk"
> } else {
>     file rename -force "~/.gitk-new" "~/.gitk"
> }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top