Venji
Venji

Reputation: 73

How to merge multiple patches into one big patch?

I have about 20 patch files in one directory.

I need to merge them into one big patch file. I have already read multiple other questions, but combinediff can only merge 2 diffs into one one.

How can I merge all 20 patches into one?

Upvotes: 3

Views: 4325

Answers (1)

VonC
VonC

Reputation: 1324268

You could simply apply all those patches, getting 20 new commits (git am, which can take multiple patches).

Then, as a case of "Practical uses of git reset --soft?", reset (--soft) to your original commit.
The index would be one representing the applied 20 patches.

A simple git diff would then generate a global patch.

A simpler approach would be to use git apply 20 times, which does not generate a commit

Upvotes: 1

Related Questions