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.
我想生成一个包含来自本地分支的所有提交的补丁。不与大师相提并论。(因为部分提交已经与 master 合并。)
您可以使用git diff srchash..HEAD > whatever.patchwithsrchash作为基本提交的 SHA-1。如果当前未签出分支,请使用branchname代替HEAD
git diff srchash..HEAD > whatever.patch
srchash
branchname
HEAD