1

Before when I installed Windows 10 when I press the arrow down or up button inside Git Bash I get my previous entered commands. But now when I have closed Git Bash i lose all the commands I have ever entered. How do I get this back?

4

Just enter exit inside the Git Bash console. It will make an .bash_history file.

  • 1
    Effectively it works, but I don't think is a good solution. Why when we close the window of git bash it doesn't update the .bash_history? – carmelolg Sep 24 '18 at 8:44
  • You only have to do it once though. The next time you close the window it will save. – Raymond the Developer Sep 24 '18 at 11:24
  • 1
    I thought also, but if I don't type exit it don't save the history – carmelolg Sep 24 '18 at 12:34
  • Or CTRL-D for fast exit also working. – dbreaux Feb 14 at 14:22
  • Observing that I lost my history because of an automatic Windows update & reboot as well :-( – dbreaux Feb 14 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.