1

New to git, as you will suppose.

I installed git on windows (vista) Everything goes fine, except I get two slightly different versions of git bash:

  1. Launch git bash from start menu

  2. Launch git gui, then from within it, launch git bash

The first one has only 'git_bash' in the app title, the second has MINGW32:c/gittest. Both work well on my test repository, but the gui launched one echoes my directory changes, displays my windows username. The bare git bash simply works, but looks more basic.

So what is happening and how can I get the 'rich' git bash without previously having to launch the gui?

Burhan Khalid
  • 169,990
  • 18
  • 245
  • 284
jose
  • 399
  • 2
  • 14
  • 1
    If you are more accustomed to the windows environment than unix, you should take a look at posh-git (http://haacked.com/archive/2011/12/13/better-git-with-powershell.aspx/) and start using git in PowerShell instead of bash. – Klas Mellbourn Jun 07 '14 at 11:21
  • 1
    My I suggest either [sourcetree](http://sourcetreeapp.com) or [github for Windows](https://windows.github.com/) - both are free and excellent; they will also fix a lot of other Windows quirks (like line endings, for example). – Burhan Khalid Jun 07 '14 at 11:33

1 Answers1

1

It simply is because git-gui will set the PS1 variable from <yourGitForWindows>/etc/profile file:

# non-printable characters must be enclosed inside \[ and \]
PS1='\[\033]0;$MSYSTEM:${PWD//[^[:ascii:]]/?}\007\]' # set window title
PS1="$PS1"'\n'                 # new line
PS1="$PS1"'\[\033[32m\]'       # change color
PS1="$PS1"'\u@\h '             # user@host<space>
PS1="$PS1"'\[\033[33m\]'       # change color
PS1="$PS1"'\w'                 # current working directory

You can try and set that in a %HOME%/.bashrc file

See also "Alter Git prompt on Windows".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250