Skip to main content

Rebase many branches (e.g. renovate) into one branch

1. Ensure your repository is up to date

git fetch --all

2. Create a new branch based on master

git checkout master
git pull origin master
git checkout -b renovate-bulk-updates

3. Rebase each renovate branch one by one

git rebase origin/renovate/lodash-4.x
git rebase origin/renovate/axios-1.x
git rebase origin/renovate/vue-3.x
# Repeat for all renovate branches you want to include

If there are conflicts:

  • Fix them manually
  • Then continue with:
git add <conflicted-files>
git rebase --continue

You can abort a problematic rebase with:

git rebase --abort

4. Review combined commits

git log --oneline

5. Push the final branch (optional)

git push origin renovate-bulk-updates

This approach preserves each commit and its message, creating a clean linear history without merge commits.