我在本地系统中有github项目openstack,我已经做了一些更改,现在我想把它推到https://bitbucket.org存储库中。我想把kilo分支推到我的远程存储库。
当试着跑
git remote add origin https://username@bitbucket.org/user_name/my_project.git我收到了跟随错误。
致命:远程来源已经存在。我运行了他们(位桶)提到的相同的命令。我不想删除主程序,请告诉我如何将本地存储库添加到位桶..
[vagrant@localhost horizon]$ git branch
master
stable/icehouse
stable/juno
* stable/kilo
[vagrant@localhost horizon]$ git branch -a
master
stable/icehouse
stable/juno
* stable/kilo发布于 2015-07-10 10:53:50
下面是从github迁移到bitbucket的步骤
1.首先使用以下命令将存储库克隆到本地计算机上
git clone <repository url>2.成功克隆之后,分离git集线器存储库。
git remote -v
git remote rm origin3.分离github存储库之后。转到bitbucket并创建一个存储库,找到选项I have code that I want to import并单击它。
4.它将为您提供从项目目录控制台运行所需的命令。这些命令如下所示
git remote add origin ssh://git@bitbucket.org/urRepository/urproject.git #you would get your repo link from bitbucket.
git push -u origin master # to push changes for the first time事情就会结束。
发布于 2015-07-10 10:36:49
使用不同的遥控器
git remote add bitbucket https://username@bitbucket.org/neelabh_singh/my_project.git
git push bitbucket stable/kilo:kilohttps://stackoverflow.com/questions/31338587
复制相似问题