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 master rc
harryxiyou@common_vm ~/forest/kvplus/kvplus $ git pull You asked me to pull without telling me which branch you want to merge with, and 'branch.dev-harry.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. 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 Fast-forward src/kv.c0 | 60 ++++++++++++++++++++++++------------------------------------ 1 files changed, 24 insertions(+), 36 deletions(-)
Usually, adding these lines to
.git/conf is fine:
[branch "dev-harryxiyou"] remote = origin merge = refs/heads/dev-harryxiyou