How is bash command history stored in Git for Windows

8,039 views
Skip to first unread message

Philip Oakley

unread,
Jan 31, 2013, 5:09:04 PM1/31/13
to msysGit
I've never really understood how the bash command history is maintained.
Is the comand history meant to be stored between sessions? I don't
appear to be able to see the commands I used yesterday, though there are
other very old command in the up/down scroll buffer.

Where should I be looking? Any suggestions for what may be going wrong

Philip

In on Windows XP Sp3

$ git --version
git version 1.8.0.msysgit.0

I've had a number of different versions installed over the last 2 years,
including the MsysGit proper compiled version, and versions loaded by
GitExtensions.

Johannes Schindelin

unread,
Jan 31, 2013, 5:55:44 PM1/31/13
to Philip Oakley, msysGit
Hi Philip,

On Thu, 31 Jan 2013, Philip Oakley wrote:

> I've never really understood how the bash command history is maintained.

Have a look at ~/.bash_history

Ciao,
Johannes

Philip Oakley

unread,
Jan 31, 2013, 5:58:28 PM1/31/13
to msysGit
From: "Philip Oakley" <philip...@iee.org>
Sent: Thursday, January 31, 2013 10:09 PM
> I've never really understood how the bash command history is
> maintained. Is the comand history meant to be stored between sessions?
> I don't appear to be able to see the commands I used yesterday, though
> there are other very old command in the up/down scroll buffer.
>
> Where should I be looking? Any suggestions for what may be going wrong

A part answer to my own question.
using the bash command 'env' I see:
HISTFILE=/c/Documents and Settings/Philip/.bash_history
but that file hadn't changed since December 2012.

I deliberately closed the bash window using 'exit' rather than my normal
Windows red-X close, and on restarting the bash window (task bar
icon...) I now saw that my last few commands from that last bash window
were present in the scroll back.

So how to get the Windows close red-X on bash to do the same as 'exit' ?

As a workaround I'll need to select focus on the bash window and type
exit when closing down.

>
> Philip
>
> In on Windows XP Sp3
>
> $ git --version
> git version 1.8.0.msysgit.0
>
> I've had a number of different versions installed over the last 2
> years, including the MsysGit proper compiled version, and versions
> loaded by GitExtensions.
> --
> --
> *** Please reply-to-all at all times ***
> *** (do not pretend to know who is subscribed and who is not) ***
> *** Please avoid top-posting. ***
> The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki -
> Github accounts are free.
>
> You received this message because you are subscribed to the Google
> Groups "msysGit" group.
> To post to this group, send email to msy...@googlegroups.com
> To unsubscribe from this group, send email to
> msysgit+u...@googlegroups.com
> For more options, and view previous threads, visit this group at
> http://groups.google.com/group/msysgit?hl=en_US?hl=en
>
> ---
> You received this message because you are subscribed to the Google
> Groups "msysGit" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to msysgit+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2013.0.2897 / Virus Database: 2639/6070 - Release Date:
> 01/31/13
>

Reply all
Reply to author
Forward
0 new messages