Tuesday, 20 August 2013

Applying a git patch from a previous commit to a later commit

Applying a git patch from a previous commit to a later commit

Let's say the git tree appears as:
1 ----> 2 ----> 3 -----> 4(HEAD/MASTER)
\
\ (PATCH)
--2A->
and I have a patch that is a diff of 2 and 2A which adds a feature.
Is there a smart way of applying this patch to the latest commit? Assuming
that all I have is the patch file and the git repo of the main line.

No comments:

Post a Comment