It's probably an already asked question, but I just don't know what are the right names to call the issue - so please guide me or answer (yes, I've seen this question but couldn't get too much from the answer).
I am trying to git pull
but receiving the following message:
You asked me to pull without telling me which branch you
want to merge with, and 'branch.2012_05_09_my_branch.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 <repository> <refspec>').
See git-pull(1) for details.
If you often merge with the same branch, you may want to
use something like the following in your configuration file:
[branch "2012_05_09_my_branch"]
remote = <nickname>
merge = <remote-ref>
[remote "<nickname>"]
url = <url>
fetch = <refspec>
See git-config(1) for details.
It probably looks like my working directory is kinda "hanging" without being attached to any branch, am I right? If so - please advice on how to get it connected back to the proper branch (2012_05_09_my_branch
for example). Probably I am even wrong with that (being a total GIT newbie), in this case please explain what's happening and what can I do about it.
Refined question: what do I need to do to run git push
and git pull
successfully without getting the message above?
Update: when I run git branch
I get:
* 2012_05_09_my_branch
master
Which kinda probably means that I am on my local 2012_05_09_my_branch
branch which is not connected to any of the remote branches?
Update N2: Why do I need to do `--set-upstream` all the time? - very worth reading as a complementary material (found only now).