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.
我可以使用什么命令来创建包含自上次推送以来提交的单个补丁文件?
谢谢,纳夫尼特
为topic分支生成单独的补丁,为所有未推送的提交,
topic
git fetch git format-patch origin/topic..topic
生成的补丁可以使用git apply.
git apply
要生成一个摘要补丁而不是单个补丁,您只需保存输出git diff,
git diff
git fetch git diff origin/topic..topic > topic.patch