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
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].
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.
Couple of things, had some difficulty finding sources so feel free to take it with a grain of salt.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With