Git 如何将Bitbucket上的远程(裸)主回购的更新拉到本地裸主回购?
首先,在Bitbucket中创建名为“test”的(裸)主回购 然后,在ipGit 如何将Bitbucket上的远程(裸)主回购的更新拉到本地裸主回购?,git,bitbucket,git-bare,Git,Bitbucket,Git Bare,首先,在Bitbucket中创建名为“test”的(裸)主回购 然后,在ip10.0.0.1的节点上创建本地裸主repo: git clone --bare https://username@bitbucket.org/username/test.git 然后,在ip10.0.0.253的节点上创建本地工作回购: git clone ssh://username2@10.0.0.1:/home/username2/test.git 因此,10.0.0.x中的工作流程为: (1) c
10.0.0.1
的节点上创建本地裸主repo:
git clone --bare https://username@bitbucket.org/username/test.git
然后,在ip10.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
的本地裸主回购?以下投诉致命:此操作必须在工作树中运行
:
git pull origin master
以下操作已完成,但后续的git日志
未显示来自50.113.23.x
的提交:
git fetch origin master
你能帮我评论一下这里的解决方法吗?非常感谢
git fetch origin master:master
即,明确更新本地
主机
非常感谢您的帮助回答!你能帮我评论一下我可以从哪里学到这些知识吗?开始并遵循教程、文档和书籍。完全披露-我是该维基页面的作者。:-)当然还有很多痛苦的练习。再次非常感谢!