1

Let's say you have commits on Branch A:

1
2
3X
4
5X
6
7

And you want to create a patch from commits 1,2,4,6. I think it's possible using 3 patches:

git format-patch -2 3X --stdout > first.patch
git format-patch -1 5X --stdout > second.patch
git format-patch -1 7  --stdout > third.patch

But is it possible using a single patch?

Vincent
  • 6,058
  • 15
  • 52
  • 94
  • especially this answer: http://stackoverflow.com/a/1892773/2082964 – Chris Maes Dec 22 '15 at 16:09
  • yes quite similar but I don't want commits 3X and 5X to be inside a single patch – Vincent Dec 22 '15 at 16:12
  • you're right; that is different. I retracted my close vote. I don't have an idea... other than `cat first.patch second.patch third.patch > one.patch` – Chris Maes Dec 22 '15 at 16:19
  • If 3X and 5X commits are only on different files than 1,2,4,6 you can extract the changed file names and only diff them. – Igal S. Dec 23 '15 at 07:42

0 Answers0