创建git远程服务器
Currently, I have created my branch dev-harry but I cannot pull it successfully as follows.
目前,我已经创建了我的分支 dev-harry,但是无法按以下方式成功将其拉出。
harryxiyou@common_vm ~/forest/kvplus/kvplus $ git branch
* dev-harry
master
rc
harryxiyou @ common_vm〜/ forest / kvplus / kvplus $ git分支
*开发
主
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.
harryxiyou @ common_vm〜/ forest / kvplus / kvplus $ git拉
你要我拉不告诉你
要合并 ,并在其中合并 “ branch.dev-harry.merge”
您的配置文件也没有告诉我。 请
在命令行上指定要使用的分支,然后
再试一次(例如'git pull')。
有关详细信息,请参见git-pull(1)。
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.
有关详细信息,请参见git-config(1)。
However, when I checkout to rc branch, it works well. I am looking for the reasons.
但是,当我签出到rc分支时,它运行良好。 我正在寻找原因。
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 checkout rc
切换到分支“ rc”
您的分支落后“ origin / rc” 3次提交,并且可以快速转发。
harryxiyou@common_vm ~/forest/kvplus/kvplus $ git pull
Updating 4ada91a..732d9b7
Fast-forward
src/kv.c0 | 60 ++++++++++++++++++++++++————————————
1 files changed, 24 insertions(+), 36 deletions(-)
harryxiyou @ common_vm〜/ forest / kvplus / kvplus $ git拉
正在更新4ada91a..732d9b7
快进
src / kv.c0 | 60 ++++++++++++++++++++++++++ ————————————
更改1个文件 ,插入24个(+),删除36个(-)
Usually, adding these lines to .git/conf
is fine:
通常,将这些行添加到.git/conf
就可以了:
[branch "dev-harryxiyou"]
remote = origin
merge = refs/heads/dev-harryxiyou
翻译自: https://www.systutorials.com/how-to-pull-your-git-tree-after-creating-it-on-remote-server/
创建git远程服务器