During a git rebase origin/main I ran into a merge conflict. A file did not exists in the local branch but in the main branch.
I then ran git mergetool and it asked me what I want to do:
Merging:
src/CMakeLists.txt
Deleted merge conflict for 'src/CMakeLists.txt':
{local}: created file
{remote}: deleted
Use (c)reated or (d)eleted file, or (a)bort? d
I selected (d)eleted file, which was wrong. After I continued the rebase I found that the file was missing.
I then checkout out the missing file using git checkout origin/main src/CMakeLists.txt, so I could recover the file.
However, the commit history now has an unintended additional commit which may lead to problems if further rebases may be necessary.
I would merely like to undo my decision so that the commit history would be the same as if I had selected the correct answer in the first place.