该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 …
我正在尝试将我的应用程序推送到Heroku,但我收到此错误消息.我环顾四周,有人提到GitHub最近开始将http存储库访问重定向到https,看来你的git对这个改变不满意.但是我有很多麻烦推向heroku,任何帮助将不胜感激.
error: RPC failed; result=22, HTTP code = 400
Run Code Online (Sandbox Code Playgroud)