Git actually ships more than one shell on Windows, you will see git-bash.exe
and git-cmd.exe
in Git directory. By default, you will use the git-bash.exe
– Git Bash.
- Git Bash launches
mintty.exe
terminal that you can finduser/bin/mintty.exe
in the Git directory. And Git Bash comes packaged with some commands that are located in theuser/bin
directory likecat
,find
,less
,scp
,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.exe
launches the Windows’scmd.exe
and it uses Windows path style. It can also use commands likels
,less
,sed
, etc.It uses Windows path style.
git-cmd.exe
can be embedded into Windows Terminal application.Note
^
is a line continuation character (similar to “ in Bash). To use^
in a command likegit diff HEAD^2
, you need to change it togit diff HEAD^^2
to escape^
.