patch - How to apply two patches against the same git revision? -
this imaginary problem, i'm having real problems patches. let's have project following git history:
a - b - c
now if receive 2 patches, c1
, c2
, meant applied on c
, how should handle them? if apply patch c1
first, not able apply patch c2
because repository has become:
a - b - c - c1
is possible apply them both, or have reply person sending c2 telling him/her update patch?
now suppose go offline , work , commit repository becomes:
a - b - c - d - e
then check email , receive patch c
. again, possible apply patch, or have ask update patch?
the classic way to:
- apply received first patch,
- refuse patch isn't fast-forward , ask sender rebase his/her repo first, re-check patch, , resend it.
the general idea isn't solve merge conflicts: creator of patch has necessary knowledge solve conflict current source code.
as linus torvalds (creator of git) said in his 2007 google talk:
so happens is, remember, distribution means nobody special.
instead of me merging, push out first tree, did not have merge issues, , tell second person:"hey, tried pull you, had merge conflicts , weren't trivial, decided honors instead."
and do. , know doing because it's changes. can merges , think moron because merge easy , obvious should have taken code, merge , update tree, , "hey, can pull me now", , pull them , did work me.
that's about: did work me. so,... , take credit. need figure out step 3: profit.
Comments
Post a Comment