I'm preparing to submit my first patch to an open source project. Here's how the process went:
However, when I run git format-patch HEAD^
, I get a diff between my two commits, which obviously doesn't work. Basically, how do I merge the two most recent commits with the project when it was forked, or something like that?
You need to use range
The … (three-dot) Symmetric Difference Notation
A similar notation
r1...r2
is called symmetric difference ofr1
andr2
and is defined asr1 r2 --not $(git merge-base --all r1 r2)
. It is the set of commits that are reachable from either one ofr1
(left side) orr2
(right side) but not from both.
So in this case it would be:
git format-patch ...master
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With