该git clone --depth命令选项说
--depth <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.
Run Code Online (Sandbox Code Playgroud)
为什么浅克隆有这种限制?为什么它只是一个补丁工作流程?
对于某些项目工作流程,我需要将最新的提交从单个分支传递给编码器,然后让它们能够push(快进)开发到主服务器.这部分是为了安全,知识产权保护和回购规模,部分是为了减少大回购会给天真编码员带来的困惑.是否有允许这样的git工作流程?
更新:根据Karl Bielefeldt的回答,git checkout --orphan …
我正在尝试从公司存储库中克隆内部存储库,并且我一直收到此错误:
error: RPC failed; result=18, HTTP code = 200
Run Code Online (Sandbox Code Playgroud)
它总是在存储库完全下载后才会发生(需要一段时间).
我尝试过使用torotiseGit.这是报告:
git.exe clone --progress -v "http://path/repository.git" "C:\Users\user\Documents\code\repository"
Cloning into 'C:\Users\user\Documents\code\repository'...
POST git-upload-pack (424 bytes)
remote: Compressing objects: 100% (4895/4895)
Receiving objects: 100% (6970/6970), 61.89 MiB | 4.82 MiB/s
Resolving deltas: 100% (2610/2610)
Resolving deltas: 100% (2610/2610), done.
remote: Total 6970 (delta 2610), reused 5702 (delta 1672)
error: RPC failed; result=18, HTTP code = 200
git did not exit cleanly (exit code 128)
Run Code Online (Sandbox Code Playgroud)
我已经尝试了几次,从Linux机器和Windows机器.同样的错误
我该如何进一步调查错误?我在Google上找不到任何有用的信息
编辑:我已经检查了Git服务器上的Apache日志 - 每个克隆都有一个GET和一个POST(结果为200).POST有点大(60MB) - 所以我尝试将postBuffer增加到500MB,但错误仍然发生
这真的是一个git …
我正在使用出色的sameersbn/gitlab为我的工作设置自定义 gitlab 服务器。
所以我有一个荒谬的场景,我使用gitlab ce v8.12.5git lfs来存储 10-20 GB范围内的文件,但我看到到处都是 500 个服务器错误,我的上传无法完成。
问题:有谁知道如何增加服务器端限制?
注意:这不是 413 nginx 问题,我已经设置了
client_max_body_size 500G所以它应该可以很好地转发到 gitlab。
如果需要更多信息(即日志文件等),我很乐意提供,只需发表评论。
在同一问题上似乎有一个相关的gitlab问题。
其他相关资源:
现在,我的假设是 docker 容器中的链或代理服务器中的某处存在超时。
所以这是我刚刚注意到docker映射的设备在 gitlab 错误出500的同一时间/dev/dm-7变得100% 满。
现在我开始相信这不是 gitlab 问题,而是 docker 问题,而且 gitlab 空间不足。
感谢您的时间,并干杯。
git ×2
docker ×1
git-clone ×1
git-config ×1
git-lfs ×1
gitlab ×1
large-files ×1
nginx ×1
workflow ×1