GIT的复杂设置:从Github到Bitbucket的fork,只推到Bitbucket
我不是GIT专家,所以我需要一些关于我正在进行的项目设置的帮助。所以基本上这就是我需要的:GIT的复杂设置:从Github到Bitbucket的fork,只推到Bitbucket,git,github,bitbucket,Git,Github,Bitbucket,我不是GIT专家,所以我需要一些关于我正在进行的项目设置的帮助。所以基本上这就是我需要的: 如何创建从Github到Bitbucket的fork?这就保证了git始终拉到mantain CORE,并使用Github主项目的最新更改进行更新 只允许推送到Bitbuket存储库,可以吗?怎么做 我使用SmartGit作为主客户端,但也有git命令行 有什么帮助吗 创建空的BitBucket回购后,您可以 git clone https://github.com/user/yourRepo cd re
git始终拉到mantain CORE,并使用Github主项目的最新更改进行更新
有什么帮助吗 创建空的BitBucket回购后,您可以
git clone https://github.com/user/yourRepo
cd repo
git remote rename origin upstream
git remote add origin https://yourAccount@bitbucket.org/yourAccount/yourRepo
git push --mirror
然后确保master
将从bitbucket
repo中提取(upstream
是指原始GitHub repo的远程设备的名称)
git推送
将推送至bitbucket回购(origin
),但您需要git向上游拉送
才能从原始GitHub回购进行拉送/更新
默认情况下,您将使用BitBucket one(就像所有其他开发人员克隆新的repo一样),但开发人员可以随时向原始GitHub repo添加引用(远程)。这种方法不起作用,因为还有其他开发人员与我一起工作,他们也需要从BitBucket repo中提取,我们的想法是从Github回购中更新Bitbucket回购,但从Bitbucket回购中提取。如果你不明白,让我知道,我建立一个简单的图表来说明我的想法need@ReynierPM好吧,那就更容易了。我已经编辑了答案。@VonC镜像错误,您的答案是“git remote add origin…”@psk谢谢。我已相应地编辑了答案。
git checkout master
git branch -u origin/master
git push.default matching