如何将Git回购从Beanstalk移动到Github?
我有我的代码回购。如何将代码从Beanstalk移动到?如果您已经在Beanstalk上使用Git,只需在GitHub上创建一个空存储库,然后将其作为远程存储添加到本地repo上即可 (假设您的回购协议在~/项目中)如何将Git回购从Beanstalk移动到Github?,git,github,Git,Github,我有我的代码回购。如何将代码从Beanstalk移动到?如果您已经在Beanstalk上使用Git,只需在GitHub上创建一个空存储库,然后将其作为远程存储添加到本地repo上即可 (假设您的回购协议在~/项目中) cd~/project git远程添加github git push github--all--tags 建议的方法是: git clone --bare url/for/beanstalk/repo.git . git push --mirror git@github.com:u
cd~/project
git远程添加github
git push github--all--tags
建议的方法是:
git clone --bare url/for/beanstalk/repo.git .
git push --mirror git@github.com:user/repo.git
另请参见此处:来自
#在本例中,我们使用名为extuser和extuser的外部帐户
#名为ghuser的GitHub帐户用于传输repo.git
#将外部回购复制到本地目录
$git克隆--裸https://githost.org/extuser/repo.git
#将镜像推送到新的GitHub repo
$cd repo.git
$git推送--镜像https://github.com/ghuser/repo.git
#取消临时本地回购
$cd。。
$rm-rf repo.git
这里给出的其他答案对我并不适用,但在Dan的难以置信的帮助下(甚至向我展示我根本不需要他的产品!),我完成了以下步骤,将我的9次回购从Beanstalk转移到githuhb,这是一件轻而易举的事。希望他们也能帮助别人
mkdir~/moverepos
cd moverepos
git克隆--bare
cd repositoryName.git
git Push--mirror
cd..
你也可以
push--all
和push--tags
,我按照建议做了,但是我没有得到分支神奇的答案,也可以用另一种方式工作(Github到Beanstalk)。这也会复制提交历史吗?(所有的分支机构呢?)
git clone --bare url/for/beanstalk/repo.git .
git push --mirror git@github.com:user/repo.git