Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git bash无法识别USB闪存驱动器_Git - Fatal编程技术网

Git bash无法识别USB闪存驱动器

Git bash无法识别USB闪存驱动器,git,Git,我在windowsXP系统下使用git bash。我试图通过在git bash中输入“cd G:”来输入我的USB磁盘,但它显示“sh.exe:cd:G::没有这样的文件或目录” 我可以在我的系统下打开我的USB磁盘 有什么问题吗?如何解决问题?Git bash使用/x表单来标识驱动器的根,而不是x:。执行cd/g应该可以正常工作(在其中工作时,您可能会看到类似的路径) 我相信这就是bash在Windows上处理驱动器的方式(我使用过的所有版本的git bash都使用它,从XP到7)。Gina,

我在windowsXP系统下使用git bash。我试图通过在git bash中输入“cd G:”来输入我的USB磁盘,但它显示“sh.exe:cd:G::没有这样的文件或目录”

我可以在我的系统下打开我的USB磁盘


有什么问题吗?如何解决问题?

Git bash使用
/x
表单来标识驱动器的根,而不是
x:
。执行
cd/g
应该可以正常工作(在其中工作时,您可能会看到类似的路径)


我相信这就是bash在Windows上处理驱动器的方式(我使用过的所有版本的git bash都使用它,从XP到7)。

Gina,真正的答案在你上面的评论中。您不仅要关闭任何GitBash窗口,还要关闭所有GitBash窗口,然后重新打开其中一个。此时,
cd/f
将起作用。顺便说一下,
cdf:
也可以工作,因为bash终端将其转换为/F。我刚刚在64位Windows 7上确认了这一点

如果您不想关闭所有bash窗口,或者这没有帮助,您可以共享驱动器并访问网络共享。对我来说,usb记忆棒在
//localhost/usb
上工作正常,关闭bash没有。您可以使用“cd..”命令进入计算机的根目录,直到您可以从闪存驱动器复制路径并在bash命令中通过它。例如“cd D:\website”,其中D是外部闪存驱动器。

我已经尝试过,但效果不好,否则。每次它找不到USB磁盘时,我都会重新启动git,然后它就可以识别。不要忘了杀死任何ssh代理。。。我浪费了一些时间来找到这个你如何创建这样一个Windows共享?