upvote
You can also rebase directly on the remote branch

    git fetch
    git rebase origin/main
reply
Nice. That'll make things a bit smoother. Changing branches often trips me up when I would later `git switch -`.
reply
Likewise with the other way around, just switch pull with push.
reply
I have always done `git pull origin main -r`
reply