You can pull another branch without switching first:
git switch my-test-branch
...
git pull origin main:main
git rebase mainYou can pull another branch without switching first:
git switch my-test-branch
...
git pull origin main:main
git rebase main
You can also rebase directly on the remote branch
Nice. That'll make things a bit smoother. Changing branches often trips me up when I would later `git switch -`.
Likewise with the other way around, just switch pull with push.
I have always done `git pull origin main -r`