Wrong Order
Sometimes conflicts are not about Changes content, but in the order they end up in.
Use Case
○ h
○ g
│ ○ f <- removes file README.md
│ ○ e <- modifies file README.md
│ ○ d
│ ○ c
├─╯
○ b
○ a
◆
- Rebase
fon top ofh:
jj rebase -r f -o h
○ f <- removes file README.md
○ h
○ g
│ ○ e <- modifies file README.md
│ ○ d
│ ○ c
├─╯
○ b
○ a
◆
- Rebase
eon top off:
jj rebase -r e -o f
× e <- modifies file README.md
○ f <- removes file README.md
○ h
○ g
│ ○ d
│ ○ c
├─╯
○ b
○ a
◆
- Conflict.
Solution
The 2 rebases swapped e and f from their original order. An easy
solution is to swap them back:
jj rebase -r e --before f
○ f <- removes file README.md
○ e <- modifies file README.md
○ h
○ g
│ ○ d
│ ○ c
├─╯
○ b
○ a
◆
And the conflict is gone.