gitpatchformat-patch

git format-patch query


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.


Solution

  • 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.