I typically have to clone remote branches that I do not have in my git repo (ex. from coworkers)
While there is an easy setting for git push
(see Why do I need to do `--set-upstream` all the time?)
I haven’t found the same to be true for git pull.
Right now my workflow is:
- oh I have to pull
branch123
fromprojectABC
from github cd projectABC && git checkout -b branch123
git pull
Alas I am greeted with:
There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> branch123
How can I make this easier?