Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/9.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
Macos 从googledrive目录中运行git init_Macos_Git_Terminal - Fatal编程技术网

Macos 从googledrive目录中运行git init

Macos 从googledrive目录中运行git init,macos,git,terminal,Macos,Git,Terminal,我想从Google Drive中运行git init,因为我的项目文件夹在那里,但每次我都会得到: MacBook$ cd Google Drive -bash: cd: Google: No such file or directory 问题在于“Google”和“Drive”两个词之间的空格,当您执行以下操作时: cd Google Drive 您的shell尝试进入“Google”目录(这就是为什么会出现“无此类文件或目录”错误) 更改目录名并再次运行该命令。您还可以调整脚本: cd

我想从Google Drive中运行git init,因为我的项目文件夹在那里,但每次我都会得到:

MacBook$ cd Google Drive
-bash: cd: Google: No such file or directory

问题在于“Google”和“Drive”两个词之间的空格,当您执行以下操作时:

cd Google Drive
您的shell尝试进入“Google”目录(这就是为什么会出现“无此类文件或目录”错误)


更改目录名并再次运行该命令。

您还可以调整脚本:

cd Google\ Drive
# or this could work too
cd "Google Drive"
将该目录引用为:

安装Google Drive后,您会注意到主目录中有一个新文件夹,名为“
Google Drive
”,或者更确切地说是“
Google\Drive

完整路径如下所示:


快捷方式:在MacOs上,可以将目标文件夹拖放到终端窗口中(首先键入“cd”)。这样你就可以很容易地用正确的拼写找到正确的路径。
/Users/YOURUSERNAME/Google\ Drive/