Git how to rebase onto empty branch for code reviews

133 views Asked by At

I'm following this recipe: https://thib.me/recipe-code-reviews-for-existing-code-with-github. In the interactive rebase step, I'm adding a pick line for the empty commit created in review-1-target repository as the first line in the rebase instructions file. However, there are merge conflicts.

How can I conduct the rebase so that merge conflicts are resolved exactly as they were in the original history given that the base is an empty commit?

1

There are 1 answers

1
linuxuserind On

Can you try if this helps to undo local changes

git fetch origin
git reset --hard origin/<branch name>
git clean -f -d