I found that reordering via git rebase -i may not create the same final result tree when working with remote files - and it can do this without warning or error messages.
Take the following sequence of commits
A - Add foo1
B - Add foo2
C - Remove foo2, Add Foo3
Using git rebase -i to reorder commits from ABC to ACB, in foo2 is present in HEAD.
Is there a way to reorder the commits that bark if a reordering changes the final tree?
I think git rebase internally uses git am to apply patches. I do not see any relevant arguments for git am that can be used to force a crash when deleting a nonexistent file, which I think will be required. Does git source code need to be fixed to get what I want?
source share