This creates a new repository root (empty
), clones all commits and rebases them to the new root (review
).
The diff between review
and empty
therefor includes the whole codebase as addition.
git switch --orphan empty
git commit --allow-empty -m 'empty'
git checkout main
git checkout -b review
git rebase empty
git push origin empty review
git checkout main
Navigate to the repos PRs and create a new one for empty <- review
.
If you want to add new commits from main
to the review
git checkout main
git checkout -b tmp
git rebase review
git checkout review
git reset tmp --hard
git branch -D tmp
git push origin review
git checkout main