When I am not on the master branch, git sometimes complains
“You asked me to pull without telling me which branch you
want to merge with, and ‘branch.basics.merge’ in
your configuration file does not tell me, either. Please
specify which branch you want to use on the command line and
try again (e.g. ‘git pull ‘).
See git-pull(1) for details.”
Just wondering if it is possible to configure git so it does always merge with the associated remote branch from origin. As an example: If I am at branch basics (which I currently am 😉 ) and I make a git pull. Now I want git to fetch this branch from origin and merge it with the same local branch.
Cheers, Rudolf
You can specify the upstream branch (see “How do you make an existing git branch track a remote branch?“):
Or, the first time you push your branch (see “Git: Why do I need to do
--set-upstreamall the time?“):