23

I use gitk for keeping an eye onto branches, commits and so on ... I am running Ubuntu 14.04. and noticed that the background color of the branch label is different in comparison to what I am used to on another machine running Ubuntu 13.10. Currently I have Git 1.9.3 installed.

Branch in gitk

Is there a way to customize the background color of the branch label in gitk?

JJD
  • 44,755
  • 49
  • 183
  • 309
  • Though I know this is long solved the replacement color is `lime`. I ran into this same problem just recently when I updated my gitk in Windows. – Jay May 23 '17 at 04:14

2 Answers2

33

That appears to be the headbgcolor, which is not available from the GUI colour settings.

Close gitk, then modify ~/.config/git/gitk and change

set headbgcolor green

to some other colour. Hex codes appear to be supported unquoted, e.g.

set headbgcolor #123456
Chris
  • 93,263
  • 50
  • 204
  • 189
  • 3
    +1 You can check how it's done in the official Dracula theme for gitk: https://github.com/dracula/gitk (*Disclaimer: I'm the maintainer.*) – Aurelien Apr 16 '18 at 18:06
  • Because I upvoted already your answer a few weeks ago, and in fact it helped me for creating this dracula theme, so thanks a lot :) It took me a while to create a dark theme for gitk and I had to dig through several threads including yours, so I think it can be useful to post a link now here with the result. If several people think it's not nice to do that, then I'll just remove the link, no problem :) – Aurelien Apr 16 '18 at 19:07
4

For Windows, you need to change headbgcolor in your %HOMEPATH%\.gitkhidden file.