Git Bash – where’s my flash drive?

I spend my day in the magnificent Git Bash shell. Recently I started bring work home by pushing the project to a bare Git repository on the flash drive at B:

git remote add flash /b/circdesk-android.git
git push flash

If the flash drive was not mounted before Git Bash is launched, it can not be seen. Some Googling resulted in folks saying there was no way to make this happen, some said setting MSYS_WATCH_FSTAB=1 works, some said mounting the drive and accessing it as \\machine\flash.

I tried closing all the Git Bash shells and restarting. Still nothing. But then I remembered that the ssh-agent is run by .bashrc (if not already running) and that might use the same runtime and drive table. So I killed the ssh-agent process and restarted the shell. Yay!

Not sure which, but I set the environment and will kill the ssh-agent first. Now I can push…

Leave a Reply