4

I'm using Windows 10 and have installed GitBash. I would like to change the background and foreground colors. However, I don't have permissions to install Windows Terminal, which can streamline the process (so I'm told) of changing the color scheme.

How, if possible, can I change the color scheme of GitBash on Windows 10?

0

4 Answers 4

2
+50

If you right click on the top bar of a git bash terminal a menu will come up, then select options. It should take you to the looks tab which will allow you to change the colors of foreground & background.

image

1
  • "right click on the top bar of a git bash terminal" helped me Commented Dec 19, 2023 at 0:37
2

Open gitbash and do the next: you can set colors inside the conf file used by gitbash .mynttyrc

cd ~
notepad.exe .minttyrc

Then set the conf as needed:

# Example .minttyrc
# Background color
BackgroundColour=150,150,255
# Text color
Black=0,0,0
BoldBlack=128,128,128
# Cursor color
CursorColour=2,2,2
# Font settings (change these to match your preference)
Font=Consolas
FontHeight=14

Once this is done, save and close notepad. Then close gitbash and open it again. Et voila!

1

Have a look at ConEmu terminal emulator for Windows, it has portable version which doesn't require install:

https://conemu.github.io/

https://www.fosshub.com/ConEmu.html

It can be highly customized and also has many predefined color themes.

2
  • Hi Intruder, a question for you. Are you associated with it in any way ? Commented Jul 20, 2023 at 23:19
  • You mean with ConEmu? No, I'm not. I just know that tool exists.
    – Intruder
    Commented Jul 20, 2023 at 23:22
1

From the post How to change RGB colors in Git Bash for windows? I quote the accepted answer:

  • Click on the upper left corner of an open Git Bash window (the Git icon in the window frame).
  • A menu appears (the same that would appear with a regular DOS cmd Window). Choose the last entry: "Properties", UPDATE 2021: "Options..." (thanks AlexD!)
  • Go to tab "Colors"
  • Choose radio button "Screen Text"
  • Remember which color is currently assigned to "Screen Text" in the row of small color boxes (it has a black frame).
  • Then select the color you want to change by clicking on the corresponding color box. This color is now assigned as "Screen Text", which is what Git Bash uses for regular text. But don't worry, this change is only temporary and needed to modify the value of a color.
  • Now change the Red/Green/Blue values for the selected color. In my case I wanted to make the fifth color from the left (much) brighter. Let's call it "Color 5". This is the color Git Bash uses to show changed files with "git status". Whenever Git Bash wants to use "Color 5" it will use the new RGB value.
  • "Screen Text" is now still set to "Color 5". So click on the original color that you have remembered.

The changes made in this way are permanent but only valid for the shortcut you have used to start Git Bash. If you create a new shortcut you are back to the original colors.

Another answer shows how to change the colors in the configuration file %USERPROFILE%\.minttyrc (may be different for other releases).

Still another answer advises to add to the end of C:\Program Files\Git\etc\profile.d\git-prompt.sh the line:

LS_COLORS=$LS_COLORS:'di=1;30:' ; export LS_COLORS

Still another answer notes that Git bash uses the default Windows console colors, which may be tweaked in the registry at HKEY_CURRENT_USER\Console.

More answers add more methods. Not all methods are valid for all releases of Git bash.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .