This is basically @lengxuehx's answer, but updated for Win 10, and it assumes your bash installation is from Git Bash for Windows from git's official downloads.
cmd /c (start /b "%cd%" "C:\Program Files\GitW\git-bash.exe") && exit
I ended up using this after I lost my context-menu items for Git Bash as my command to run from the registry settings. In case you're curious about that, I did this:
Bash
in the shell
key at HKEY_CLASSES_ROOT\Directory\Background\shell
Icon
(not a new key!) that is the full path to your git-bash.exe, including the git-bash.exe part. You might need to wrap this in quotes.Bash
to the text you want to use in the context menu
Bash
called command
command
's default value to cmd /c (start /b "%cd%" "C:\Program Files\GitW\git-bash.exe") && exit
Then you should be able to close the registry and start using Git Bash from anywhere that's a real directory. For example, This PC
is not a real directory.