Git actually ships more than one shell on Windows, you will see
git-cmd.exe in Git directory. By default, you will use the
git-bash.exe – Git Bash.
- Git Bash launches
mintty.exeterminal that you can find
user/bin/mintty.exein the Git directory. And Git Bash comes packaged with some commands that are located in the
sed, etc. Therefore it provides some Bash experience on Windows.
It uses Linux path style.
It can not be embedded into Windows Terminal application.
git.cmd.exelaunches the Windows’s
cmd.exeand it uses Windows path style. It can also use commands like
It uses Windows path style.
git-cmd.execan be embedded into Windows Terminal application.
^is a line continuation character (similar to “ in Bash). To use
^in a command like
git diff HEAD^2, you need to change it to
git diff HEAD^^2to escape