代码之家  ›  专栏  ›  技术社区  ›  millimoose Tomasz Nurkiewicz

如何仅备份我的承诺?

git
  •  1
  • millimoose Tomasz Nurkiewicz  · 技术社区  · 6 年前

    如何生成可从中访问的提交的存档 master -到Git中的存储库?格式由 git format-patch 会有用的。

    (背景:由于投影机不太合适,我作为一个承包商完成了工作,而且我已经有一个客户因为我的自由职业中介合同中的粗略条款而没有支付我最后一张发票的费用,所以我希望能有一些收据,证明如果有压力的话,我已经实际完成了工作。)

    3 回复  |  直到 6 年前
        1
  •  4
  •   jthill    6 年前
    git log --all -p --author="<your user>" > test.log
    

    应该将更改日志保存到文件中。

        2
  •  1
  •   haolee    6 年前
    for commit in $(git log --all --author="email-address" --pretty=format:"%h");
    do
            git format-patch $commit -1
    done
    

    这将为您的提交生成修补程序。

        3
  •  1
  •   phd    6 年前

    使用 git bundle . 为一系列提交创建绑定:

    git bundle create update.bundle HEAD~5..HEAD
    

    恢复提交使用 git fetch git pull :

    git pull update.bundle master