I’ve successfully played around with some of the color settings in the Git Bash on Windows – I’m able to set a few things, like the colors of the local, the current and remote branches in my .gitconfig file:
[color "branch"]
current = cyan bold
local = cyan
remote = red
But what I haven’t managed to change are the colors of the prompt – the username@machine at the beginning of the line (in the yellow rectangle in my screenshot), and the project and branch I’m currently on (purple rectangle).

Is there a way to influence those, too? Which .gitconfig settings do I need to set to change those colors?
In your
.bashrcyou can set your prompt using thePS1variable (which is likely set to a global value in/etc/profileor another file in/etcwhich may be distribution dependent).Here’s an example:
In order for the command substitution to work, you need
shopt -s promptvarswhich is the default.This will output the user and hostname in cyan, the current directory in blue and the git branch in green on terminals that work with
TERM=xterm-color.See
man 5 terminfoandman tputfor more information about terminal controls.