简体   繁体   English

带有project-name.git的源代码如何结帐

[英]Source code with project-name.git how do I checkout

I have this zip file. 我有这个压缩文件。 I have no idea how to checkout the source. 我不知道如何签出源。

Here is the folder. 这是文件夹。 git文件夹结构

As my understanding. 以我的理解。 Normally the git folder is .git. 通常git文件夹是.git。 I am not sure how come it is like this. 我不确定这是怎么回事。

I tried to rename the shiroproject.git to .git, and try to run git status then it prompted This operation must be run in a work tree 我尝试将shiroproject.git重命名为.git,并尝试运行git status然后提示该操作必须在工作树中运行

Can anyone help on this matter? 有人可以帮忙吗?

It looks like he may have sent you a zip of the bare repo . 看来他可能已经给您寄来了一份空库 If so you will need to clone it to have normal git access to the files within. 如果是这样,您将需要克隆它以对其中的文件具有正常的git访问权限。 Try the following from the folder where shiroproject.git is located... shiroproject.git所在的文件夹中尝试以下操作...

$ git clone ./shiroproject.git shiroproject
$ cd shiroproject
$ git status

您可以尝试将X.git目录视为远程目录,并对其进行git克隆,这将提取工作树,您应该会看到项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM