how to pull your git tree after creating it on remote server

Currently, I have created my branch dev-harry but I cannot pull it successfully as follows.

harryxiyou@common_vm ~/forest/kvplus/kvplus $ git branch
* dev-harry

harryxiyou@common_vm ~/forest/kvplus/kvplus $ git pull
You asked me to pull without telling me which branch you
want to merge with, and '' 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.

If you often merge with the same branch, you may want to
use something like the following in your configuration file:

[branch "dev-harry"]
remote = <nickname>
merge = <remote-ref>

[remote "<nickname>"]
url = <url>
fetch = <refspec>

See git-config(1) for details.

However, when I checkout to rc branch, it works well. I am looking for the reasons.

harryxiyou@common_vm ~/forest/kvplus/kvplus $ git checkout rc
Switched to branch 'rc'
Your branch is behind 'origin/rc' by 3 commits, and can be fast-forwarded.

harryxiyou@common_vm ~/forest/kvplus/kvplus $ git pull
Updating 4ada91a..732d9b7
src/kv.c0 | 60 ++++++++++++++++++++++++------------------------------------
1 files changed, 24 insertions(+), 36 deletions(-)

asked Dec 19, 2014 by harryxiyou (5,830 points)

1 Answer

Usually, adding these lines to .git/conf is fine:

[branch "dev-harryxiyou"]
	remote = origin
	merge = refs/heads/dev-harryxiyou
answered Dec 19, 2014 by Eric Z Ma (44,280 points)

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost