克隆git“浅”时出错知识库 [英] Error when cloning git "shallow" repository
问题描述
发出命令 git clone --bare / path / to / repo
时出现以下错误:
fatal:尝试从浅仓库中获取/克隆
首先,什么是浅仓库为什么不让我克隆它?
浅仓库是一个不包含完整历史记录的仓库。
请参阅 git-clone手册页
a>:
- 深度
使用历史记录创建浅表副本截断到指定的
修订号。一个浅的
仓库有一些限制
(你不能从它克隆或获取,
也不是从它推入或者推入),但是如果你只对
历史悠久的大型项目
的最近历史记录,并且希望
以补丁的形式发送修复。
I'm getting the following error when issuing the command git clone --bare /path/to/repo
:
fatal: attempt to fetch/clone from a shallow repository
First, what is a shallow repository and why doesn't it let me clone it?
A shallow repository is a repository which does not contain the full history.
See the git-clone manpage:
--depth
Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.
这篇关于克隆git“浅”时出错知识库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!