如何从Bitbucket的遥控器(Bare)主存储库中提取更新到本地Bare Master Repo



首先,在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

最新更新