I'm in master and I do a git pull, I get a message indicating I need to pull a remote branch.
Typically I do a git co [branch] then git pull/rebase.
Is there a way to git pull/rebase of [branch] without having to do a git co [branch] first?
I'm in master and I do a git pull, I get a message indicating I need to pull a remote branch.
Typically I do a git co [branch] then git pull/rebase.
Is there a way to git pull/rebase of [branch] without having to do a git co [branch] first?
git pull origin branch
Sorry, forgot to mention that pull merges.
If you can use git fetch origin branch to just fetch that branch. http://www.kernel.org/pub/software/scm/git/docs/git-fetch.html
I don't think there is any way to do an operation on a branch without switching to it. But you can combine the pull and rebase by doing git pull --rebase origin
If you combine Apikot and Jeremy you get:
git pull --rebase origin branch
Or, if you haven't set the branch mapping up in your config:
git pull --rebase origin <src>:<dst>