Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT: Get Bash Here on network location

Tags:

git

When I do 'Get Bash Here' on a network location the console isn't in that directory. Instead the directory is /c/Windows.

Is this a limitation of Git Bash?

like image 615
Pickels Avatar asked Apr 16 '26 07:04

Pickels


1 Answers

No, this is a limitation of Windows. The Windows "current directory" for a program cannot be UNC pathname, but must be a path with a drive letter. You will need to assign a drive letter to your network location.

You can either do this through the normal Windows Explorer method, or there's a shortcut command line to automatically create a drive letter:

pushd \\server\share\path

Run that in a usual Windows cmd shell, and it will allocate a new drive letter and change to it. Then you can use "Git Bash Here" on that drive letter and path from Windows Explorer.

like image 156
Greg Hewgill Avatar answered Apr 18 '26 22:04

Greg Hewgill



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!