命令git clonegit@github.com:whatever创建一个名为whatever的目录,其中包含Git存储库:
./
whatever/
.git
我希望将Git存储库的内容克隆到我的当前目录中。/而是:
./
.git
命令git clonegit@github.com:whatever创建一个名为whatever的目录,其中包含Git存储库:
./
whatever/
.git
我希望将Git存储库的内容克隆到我的当前目录中。/而是:
./
.git
当前回答
当您将文件移动到需要的位置时,是否也在移动.git目录?根据您的操作系统和配置,此目录可能被隐藏。
它包含repo和支持文件,而位于/public目录中的项目文件仅为当前签出提交(默认情况下为主分支)中的版本。
其他回答
如果要将其签入当前目录,请确保删除.git存储库。
rm-rf.git然后是git克隆https://github.com/symfony/symfony-sandbox.git
For Windows user
1> Open command prompt.
2> Change the directory to destination folder (Where you want to store your project in local machine.)
3> Now go to project setting online(From where you want to clone)
4> Click on clone, and copy the clone command.
5> Now enter the same on cmd .
It will start cloning saving on the selected folder you given .
您可以使用以下git命令使用自定义目录名进行克隆
git clone <git_repo_url> <your_custom_directory_name>
注意:您不需要创建自定义目录,因为它会自动创建
克隆:
git clone git@jittre.unfuddle.com:jittre/name.git
克隆“特定分支”:
git clone -b [branch-name] git@jittre.unfuddle.com:jittre/name.git
我想很多人都想问这个问题的例子就是这个。如果您位于git存储库内容转储到的目录中,请运行:
git clone git@github.com:whatever .
结尾处的“.”将当前文件夹指定为签出文件夹。