• 请不要在回答技术问题时复制粘贴 AI 生成的内容
wangyzj
V2EX  ›  程序员

git clone 有没有办法在保留全部 git log 的情况下大幅度缩减 clone 的仓库大小

  •  
  •   wangyzj · Aug 22, 2022 · 2766 views
    This topic created in 1381 days ago, the information mentioned may be changed or developed.
    7 replies    2022-08-24 01:02:45 +08:00
    dreasky
        1
    dreasky  
       Aug 22, 2022
    --depth=1
    billzhuang
        2
    billzhuang  
       Aug 22, 2022
    是要保留每个 branch 的全部 log 么?
    clrss
        3
    clrss  
       Aug 22, 2022
    treeless clone

    还有个 blobless clone ,不过效果不明显。
    Loserzhu
        4
    Loserzhu  
       Aug 22, 2022
    git clone --filter=blob:none <your-repo-hrl>
    wangyzj
        5
    wangyzj  
    OP
       Aug 22, 2022
    @billzhuang #2 恩
    wangyzj
        6
    wangyzj  
    OP
       Aug 22, 2022
    @dreasky #1 depth=1 没有 log
    Arnie97
        7
    Arnie97  
       Aug 24, 2022
    关于哪些参数能减少 git clone 内容,减少了哪些部分这个问题,这篇文章图画的比较清楚:
    https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5028 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 43ms · UTC 09:42 · PVG 17:42 · LAX 02:42 · JFK 05:42
    ♥ Do have faith in what you're doing.