gpt4 book ai didi

git - 如何从浅克隆中获取完整的提交日志?

转载 作者:行者123 更新时间:2023-12-05 04:15:54 24 4
gpt4 key购买 nike

是否可以从浅克隆的本地副本获取提交日志历史记录 (--depth = 1)

我在我的 jenkins 构建作业中使用浅层克隆来获取代码和构建,但更改日志不完整,因为我使用的是浅层克隆。有办法解决吗?

最佳答案

理论上,您可以进行部分浅克隆,其中克隆所有 commit 对象,但仅克隆 treeblob 对象深度为 1:

git clone --filter=tree:1 <repo>

但是 Github 不支持这个选项:

fatal: remote error: filter 'tree' not supported (maximum depth: 0, but got: 1)

据我所知,它可以在 GitLab 上运行。

关于git - 如何从浅克隆中获取完整的提交日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30158978/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com