I have a repo where I want to delete all the commits before one commit with the purpose of changing the initial commit of the repo.
I've created a branch with its last commit as the commit I want as the new root:
git checkout -b newroot SHA
Then I've created a new commit for the initial commit:
git checkout -b initial $(echo "Kill history" | git commit-tree $(git write-tree))
Then I want to rebase master on top of initial starting from commit SHA, so I did:
git rebase --onto initial newroot master
But the rebase does not succeed. I get conflicts after applying some commits. Maybe I'm not understanding something but the way I see it, I shouldn't get any conflicts since I just want to apply all the commits of master on top of that new "fake" initial commit.
Thanks in advance.