Git - generate patch for all commits in a branch
How can I generate patch for all commits in a given branch by knowing only the branch name? This step is part of a complex workflow all of which is being automated. Hence requiring someone to manually determine the first commit in the branch is not an option. Note that anything relying on reflog is not an option either because changes in the branch are not made locally. VonC If you know from which branch your "given branch" has been created, then making a patch is easy : git diff master Branch1 > ../patchfile git checkout Branch2 git apply ../patchfile (and you can generate a patch applicable