Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to register newly mounted drive in git bash?

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
like image 763
Łukasz Podolak Avatar asked Mar 04 '11 18:03

Łukasz Podolak


People also ask

How do I mount a drive in Git bash?

In order to navigate to a different drive/directory you can do it in convenient way (instead of typing cd /e/Study/Codes), just type in cd[Space], and drag-and-drop your directory Codes with your mouse to git bash, hit [Enter].

How do I open a directory in git bash?

Using Windows Explorer, navigate to any directory you want, type "cmd" in the address bar it will open Windows command prompt in that directory. Along the same lines, if you have the git directory in your path, you can type "git-bash" in the address bar and a Git Shell will open in that directory.


1 Answers

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.

like image 53
jaypb Avatar answered Sep 21 '22 08:09

jaypb