"Git Bash here" does not save Bash history between sessions

I run Git -1.8.0-preview20121022 on Windows 7, and the installation was with "Git Bash Only" (least obsessive for Windows cmd).

When I open Git Bash from the Start menu shortcut, everything is fine with the story.

But when the Git Bash here context menu (either a git-cheetah shell extension or a simpler registry) is what started the session, the commands from that session are not saved in .bash_history .

How can one understand why this is happening? Or better yet, does anyone know how to fix this?

+8
msysgit bash shell windows-7 git-bash
source share
2 answers

You can fix this by adding this line to your ~/.bash_profile

 PROMPT_COMMAND='history -a' 
+14
source share

Enter

 PROMPT_COMMAND='history -a ~/.bash_history' 

in .bash_profile did this for me.

+4
source share

All Articles