text 将Github回购分配给Bitbucket

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 将Github回购分配给Bitbucket相关的知识,希望对你有一定的参考价值。

Go to Bitbucket and create a new repository (its better to have an empty repo)
    git clone git@bitbucket.org:abc/myforkedrepo.git
    cd myforkedrepo

Now add Github repo as a new remote in Bitbucket called "sync"
    git remote add sync git@github.com:def/originalrepo.git

Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync"
    git remote -v

Now do a pull from the "master" branch in the "sync" remote 
    git pull sync master

Setup a local branch called "github"track the "sync" remote's "master" branch
    git branch --set-upstream github sync/master

Now push the local "master" branch to the "origin" remote in Bitbucket.
    git push -u origin master
    

Courtesy: http://stackoverflow.com/questions/8137997/forking-from-github-to-bitbucket

以上是关于text 将Github回购分配给Bitbucket的主要内容,如果未能解决你的问题,请参考以下文章

GitHub Actions - 将公共回购克隆到我的私人回购?

在GitHub上分组回购? [重复]

推送到 GitHub - 推送到...(回购)过早的 EOF 失败

将 at 标签分配给 Github Release 也会将其分配给 Commit

Git:将完整回购与另一个合并[重复]

如何防止 github.com/ory/dockertest 将容器分配给随机端口?