git 在哪里放了一个克隆

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7223462/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:54:55  来源:igfitidea点击:

Where did git put a clone

gitgithub

提问by bb2

I'm pretty new to git. For a class the teacher posted a link to clone a project file it said

我对 git 很陌生。对于一个班级,老师发布了一个链接来克隆它说的项目文件

git clone git://github.com/foo

I typed the command and it seemed to work. Problem is I don't know where the file is! If I type the command again it says destination path already exists and is not an empty directory.

我输入了命令,它似乎起作用了。问题是我不知道文件在哪里!如果我再次输入命令,它会说目标路径已经存在并且不是空目录。

Any help really appreciated =S

任何帮助真的很感激=S

回答by jwodder

The repository should have been cloned into a directory named "foo" located in whichever directory you ran the git clonecommand from.

存储库应该已克隆到名为“foo”的目录中,该目录位于您运行git clone命令的任何目录中。

回答by manojlds

It would be in a folder named foo

它将在名为的文件夹中 foo

Generally, do

一般来说,做

git clone git://github.com/foo .

Note the .in the end. You will get the repo in the current folder.

注意.最后。您将在当前文件夹中获得 repo。

Or explicitly specify the folder:

或者明确指定文件夹:

git clone git://github.com/foo foo.clone

回答by Ezra A.Mosomi

This depends on where you are running this from. like for "foo"

这取决于您从哪里运行它。喜欢“ foo

root@EPUMBI:~# git clone https://github.com/epumbi/hacking.git

Just to know where you are from the place you are initiating the command type the following;

只是为了知道您从启动命令的地方所在的位置,请键入以下内容;

root@EPUMBI:~# pwd

/root

/根

So from the above after typing pwdwhich is print working directory, it tells you that you are on the root directory.

因此,从上面键入打印工作目录的pwd后,它告诉您您在根目录中。

Then to see your files downloaded like the above, you can use lsto view the files on the root directory/folder, then type the following to get into the directory so that you can execute the program.

然后看到你下载的文件如上,你可以使用ls查看根目录/文件夹中的文件,然后输入以下内容进入目录,以便你可以执行程序。

root@EPUMBI:~# cd hacking

Don't forget to change the permissions to allow the file to be executable by doing the following command;

不要忘记通过执行以下命令更改权限以允许文件可执行;

root@EPUMBI:~# chmod +x ./install.sh

I Am running the cmd in root mode so you can use sudo chmod +x ./install.shHope it helps!

我在 root 模式下运行 cmd,所以你可以使用sudo chmod +x ./install.sh希望它有帮助!