Saturday, November 21, 2026

Share history between VSCode and Git terminals

I use the terminal from Git for Windows quite frequently. And also the integrated terminal in VSCode. The problem is, the Git terminal will never remember the history from VSCode.

I found this solution where you modify ~/.bash_profile file, adding this line:

# https://stackoverflow.com/a/10901227
PROMPT_COMMAND='history -a'

It worked instantly.

No comments: