- Published on
Git fetch
- Authors
- Name
- Gene Zhang
Rebase local branch to remote main without switching branch
- Fetch from origin and update the local main branch:
git fetch origin main:main
Without updating the local main branch:
git fetch origin main
- Rebase the local main branch to the remote main branch:
git rebase main