git diff added/removed lines colors customization #4349
-
Is there a way to change the colors showing the lines added/removed in the diff view? The red and green are not good choices for us with red-green color deficiency (8% of males) |
Beta Was this translation helpful? Give feedback.
Answered by
stefanhaller
Mar 2, 2025
Replies: 1 comment 3 replies
-
I recommend using a custom pager (I'm a big fan of delta myself). Most pagers allow you to customize the colors; delta does. Unfortunately you can't use a pager in the staging view yet; this is being worked on, but won't be done any time soon. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It looks like that screenshot shows the normal diff view; yes, custom pagers work there, that's their main point. The case where they don't is the staging view, i.e. if you press enter on a file to stage individual lines.
I recommend custom pagers not only for customizability of the colors, but for several other reasons. The two main ones for me are highlighting of changed words within a line, and delta's feature of making line numbers clickable (you can click on them and this takes you directly to the editor on that line; huge time saver).
(Another limitation of custom pagers is that they currently don't wo…