如何从本地分支(GIT)中的所有提交生成补丁文件?(How can i generate a patch file from all commits in a local branch (GIT)?)
我想生成一个包含来自本地分支的所有提交的补丁。 没有与主人比较。 (因为部分提交已经与主服务器合并。)
I would like to generate a patch with all commits from a local branch. Without Comparing to the master. (because a part of the commits are already merged with the master.)
最满意答案
您可以使用git diff srchash..HEAD > whatever.patch其中srchash是基本提交的SHA-1。 如果当前未检出分支,请使用branchname而不是HEAD
You can use git diff srchash..HEAD > whatever.patch with srchash being the SHA-1 of the base commit. If the branch is not currently checked out, use branchname instead of HEAD
更多推荐
发布评论