While working on a project, it is necessary to pull some branches from remote and merge into current branch.
To update another branch, we have to
- Stash local changes on current branch
- Checkout to required branch (say
foo
) - Pull changes
- Switch back to previous branch
- Pop stash
All these steps can be done with single command on terminal using
git fetch origin foo:foo
How to do the same with magit in single step?
: fetch origin foo:foo
(not intended to be facetious -- I'm just pointing out that you can run arbitrary git commands from inside git).