首先,在bitbucket中创建了名称为" test"的(裸露的(主仓库。
然后,使用IP 10.0.0.1
的节点上创建本地裸露的主回购:
git clone --bare https://username@bitbucket.org/username/test.git
然后,使用IP 10.0.0.253
:
git clone ssh://username2@10.0.0.1:/home/username2/test.git
因此,10.0.0.x
中的工作流量为:
(1) code on 10.0.0.253
(2) at 10.0.0.253, git push to 10.0.0.1
(3) at 10.0.0.1, git push to Bitbucket
假设在10.0.0.x
(例如50.113.23.x
(外创建本地工作仓库,直接从Bitbucket:
mkdir test
cd test
git clone https://username@bitbucket.org/username/test.git
那里的工作流程是:
(1) code on 50.113.23.x
(2) at 50.113.23.x, git push to Bitbucket
现在,您能帮助评论如何将更新从bitbucket存储库中提取到10.0.0.1
的本地裸露主仓库吗?以下抱怨fatal: This operation must be run in a work tree
:
git pull origin master
以下结束,但是随后的git log
显示50.113.23.x
没有提交:
git fetch origin master
您能在这里评论解决方法吗?非常感谢!
git fetch origin master:master
即。明确更新本地master
。