Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize colors in "git gui"?

Tags:

git gui is a pretty useful graphical client, but it's utility is somewhat by the coloring of the diff: Context text is typeset in black (hence overly emphasized), while changes are highlighted in weak shades of red and green – a problem with partial red-green color blindness.

For git diff the colors can be configured (settings color.diff.*), but git gui ingores those settings.

Are there any settings available, that affect the color choices in git gui?

like image 299
kdb Avatar asked Feb 28 '19 10:02

kdb


People also ask

Does git have a gui?

Git comes with built-in GUI tools for committing (git-gui) and browsing (gitk), but there are several third-party tools for users looking for platform-specific experience.

What is git-gui used for?

git gui focuses on allowing users to make changes to their repository by making new commits, amending existing ones, creating branches, performing local merges, and fetching/pushing to remote repositories. Unlike gitk, git gui focuses on commit generation and single file annotation and does not show project history.

How do I run git-gui?

Installing a GUI To run gitk, type gitk in your command line or terminal. To run git-gui, type git gui instead.


1 Answers

With Git 2.30 (Q1 2021),

See commit 4d22c05 (22 Nov 2020) by Serg Tereshchenko (last-partizan).
(Merged by Junio C Hamano -- gitster -- in commit f4d8e19, 18 Dec 2020)

git-gui: Fix selected text colors

Signed-off-by: Serg Tereshchenko
Signed-off-by: Pratyush Yadav

Added selected state colors for text widget.

Same colors for active and inactive selection, to match previous behaviour.

This suggests you can edit the Tcl sources of git-gui to change any color you need.
This was for instance suggested in "Dark theme for git gui"

Example of color customization:

With Git 2.30 (Q1 2021),

See commit da4d86d (18 Dec 2020), and commit f9481b1 (22 Nov 2020) by Stefan Haller (stefanhaller). (Merged by Junio C Hamano -- gitster -- in commit f4d8e19, 18 Dec 2020)

git-gui: use gray background for inactive text widgets

Signed-off-by: Stefan Haller
Signed-off-by: Pratyush Yadav

This makes it easier to see at a glance which of the four main views has the keyboard focus.

like image 94
VonC Avatar answered Oct 05 '22 06:10

VonC