克隆git“浅”时出错知识库 [英] Error when cloning git "shallow" repository

查看:438
本文介绍了克隆git“浅”时出错知识库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

发出命令 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆