我在Windows 7上安装了bonobo git服务器。
我通过倭黑猩猩创建了一个新的存储库“SFK”。
然后我克隆成那样:
git clone http://localhost/Bonobo.Git.Server/SFK.git
git add "trans.cs"
git commit -m "added"
git push http://localhost/Bonobo.Git.Server/SFK.git
一切正常。
当我尝试使用
时git pull http://localhost/Bonobo.Git.Server/SFK.git
出现此错误
fatal:
Couldn't find remote ref HE
Unexpected end of command stream
我哪里错了?我是这个git和bonobo的新手。 请建议如何纠正这个问题。
更新:
我在推后尝试了这个。
git config --global pull.default current
git config --global push.default current
有效。
答案 0 :(得分:6)
这些设置允许git知道要推送什么或从中提取什么:
按当前分支更新接收端具有相同名称的分支。适用于中央和非中央工作流程。
应该只是:
git config --global push.default current
(我不知道拉的设置)
我建议:
所以:
git push -u origin master
git pull origin
之后,一个简单的git push
就足够了:更多信息请参见“Why do I need to explicitly push a new branch?”。
答案 1 :(得分:2)
我在推后尝试了这个。
git config --global pull.default current
git config --global push.default current
我拉了之后试过这个命令..
然后,当我推它时,它的工作原理.. 我还需要知道这背后的情景吗?
真的这是单独的原因还是?
如果有人想出来请回复..