Both my office and home computers have Git Bash for Windows from the very same source (Git for Windows, that came with TortoiseGit), but Git Bash's prompt differs on both machines:
- on office computer I have
/c/path (branch)
all green (this is, how I would like it to have), - on home computer I have only path (no branch) and all white.
Up until now I was told, that this is PS1
variable, kept in ~/.bashrc
file. However, on both machines, this files is missing (executing notepad ~/.bashrc
opens up empty Notepad).
I'm lost here. If ~/.bashrc
doesn't exists, then from where Git Bash "knows", that it should display current branch, in a green prompt? And why the same doesn't happen on second machine?
EDIT: I also tried to compare c:\Program Files\Git\etc\
folder contents for both machines and contents of Git Bash.vbs
file. There identical on both computers so I even more have no idea, how it can be, that Git Bash's prompt differs on both computers (and how to fix this).
Several answers (like this, this and this) has suggested me, that I should look for .bash_profile
and .bash_prompt
files. Unfortunately, these two also are missing on both my computers.
Exactly what file decides about that under Windows 7? Where else should I look for, and what PS1
variable's value should be, to have current branch shown in green prompt on both machines?