I am trying to create a patch through git between master and my working branch.
I used following command:
git format-patch master..workingbr
But it is creating incremental patches for all the intermediate commits. I wanted to create a single patch for the difference between master branch and current working branch.
Asked
Active
Viewed 206 times
0

Adil
- 2,418
- 7
- 34
- 38
-
1http://stackoverflow.com/questions/616556/how-do-you-squash-commits-into-one-patch-with-git-format-patch seems similar – VonC Oct 10 '12 at 06:48
-
Thanks. Creating a branch is the only solution? can't it be done without it? – Adil Oct 10 '12 at 07:26
-
1yes squashing your commits on a *throwaway* branch is better in order to generate your patch from it. – VonC Oct 10 '12 at 07:40
1 Answers
1
from the man page - git format-patch
- Prepare each commit with its patch in one file per commit,..
So, if you want a single patch, you do need to create a single commit that squashes your series together, probably on a separate branch, as per VonC's comments.

Philip Oakley
- 13,333
- 9
- 48
- 71