How to register newly mounted drive in git bash?

Łukasz Podolak picture Łukasz Podolak · Mar 4, 2011 · Viewed 10.9k times · Source

In my day-to-day work (I'm using MS Windows), I keep my git bash (actually using console2 for this) open for the whole day. It is also very frequent that I mount new drives that I would like to work with git. However I noticed that I need to exit the bash and open it again in order to make it recognize new drive letter.

Is there any command that 'registers' already mounted drive in git bash ? thanks

edit2: I do not have any option to left a comment under my own question (weird ..?), so I post it here:

$ mount -a
sh.exe": mount: command not found

Answer

jaypb picture jaypb · Aug 23, 2012

Couple of things, had some difficulty finding sources so feel free to take it with a grain of salt.

  1. Msysgit simply doesn't include a version of mount. It is my understanding that cygwin does, however. There is no simple way to either view all attached drives or mount a new drive in msys, and thus Git Bash.

To answer your question, you don't: Git Bash does not dynamically assign drives, so if you mount new drives, you need to close all instances and restart Git Bash (source). The source referenced there is cached here. Sorry there's not a nicer solution.