to revert commit B, I know there will be a conflict because commit B has three which is edited afterward by commit C to 3. My question is- how the comparison is done between HEAD and commit B's parent Commit A? whats the sequence?
Commit A:
one
two
three
Commit B:
one
2
three
Commit C:
one
2
3
assuming you're talking about 1 file with those 3 lines being changed per commit commit A to B is a diff that's changing line 2 two -> 2 when u try to revert B it's trying to apply 2 -> two on HEAD since your head is C.. it tries to apply the 2 -> two diff on top of commit C it should not have conflict in this case unless commit C touches line 2
Обсуждают сегодня