我有一个项目,我从公共回购克隆到我调整并推送到Heroku的PC上。
我现在希望将我调整过的代码作为备份推送到BitBucket。Git来源于bitbucket
$ git status
On branch master
Your branch is ahead of 'origin/master' by 13 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
$ git remote
heroku
origin
当我尝试用加到位桶的命令,它的错误:
fatal: remote origin already exists
也就是说,后:
$ git remote add origin [email protected]:me/myproject.git
$ git push -u origin --all # pushes up the repo and its refs for the first time
$ git push origin --tags # pushes up any tags
我会纠正以为我只需要更新“origin
“指向BitBucket而不是原始的回购?
我添加了我的新远程,然后尝试git分支-u桶/主但是收到以下错误:“错误:请求的上游分支”桶/主“不存在” – Dercni
好了,因为分支已不存在,在你第一次推动它之前,没有什么可以跟踪的 –