26

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
  • 50,076
  • 60
  • 203
  • 339
  • 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

37

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

Close gitk, then modify ~/.config/git/gitk (or ~/.gitk, check whether either of these files exists already) and change

set headbgcolor green

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

set headbgcolor #123456
ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
  • 5
    +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.*) – Aurélien Apr 16 '18 at 18:06
4

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