我有一個項目,我從公共回購克隆到我調整並推送到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
好了,因爲分支已不存在,在你第一次推動它之前,沒有什麼可以跟蹤的 –