Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有多个 git 存储库,并希望为每个存储库生成一个大的 .diff 文件。
然后,客户将使用“补丁”实用程序之类的工具应用此 .diff 补丁,以在存储库中生成文件减去 git 历史记录。
有谁知道我怎么能做到这一点?
谢谢你的时间,马特
如果您想与任何事物进行比较……为什么不这样做呢?
$ mkdir empty $ ls empty myproject $ diff -ruN empty myproject > diff-against-nothing.patch
git diff 4b825dc642cb6eb9a060e54bf8d69288fbee4904 > diff-against-nothing.patch 我发现了 git 的魔法空 SHA1!