Wednesday, February 21, 2018

Git (for the color blind): Detecting changes to a repository

I am color blind. Git's command-line clearly written by developers who are not color blind. This post will present how to get around Git's use of unreadable, dark-gray-text on a black background. Here is an example of Git's use of dark-gray to indicate files have been modified (if you see the color red, why are you reading this article?):



In order to change from the dark-gray-text on a black background run git Gtatus and pipe it through more:
git status | more

An example of this is as follows:



Notice above that piping through more removes all dark-gray and makes the text legible.

Another way to fix the text issue is to swap the foreground and background colors of the console window. This works for modified but new files are markee in light green so these become hard to see.  It is even possible to set the colors Git uses. An excellent article discussing this is How to: Colours in Git.

In case Mr. Nnathan Hoad's blog link (reference above) goes away, here is the contents of his blog:


No comments :

Post a Comment