简体   繁体   English

无需克隆存储库即可获取 .git 目录

[英]Get .git directory without cloning down a repository

I have a very large git repo which takes a while to clone.我有一个非常大的 git repo,需要一段时间才能克隆。 However I don't need the full repo, I instead want to examine the .git repo that gets generated.但是我不需要完整的 repo,而是想检查生成的.git repo。 Is there a way I can get the .git folder for this repo without actually cloning it down?有没有办法可以在不实际克隆它的情况下获取此 repo 的.git文件夹?

I think you mean a bare clone我想你的意思是一个裸克隆

git clone --bare

It will create the clone without files and the root of the folder will have the contents of the .git folder.它将创建没有文件的克隆,文件夹的根目录将包含 .git 文件夹的内容。

See docs查看文档

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

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