我有一個本地目錄,這個目錄以前是用git倉庫配置的,並且託管在名爲BitBucket的服務上。如何切換我的git倉庫的URL?
現在我取得了GitHub上的存儲庫,要更新本地引用,但我得到這個錯誤:
git remote add origin https://github.com/genadinik/iPhoneBusinessPlan.git
fatal: remote origin already exists.
Alexs-MacBook-Pro-2:BusinessPlan alexgenadinik$ git push -u origin master
error: src refspec master does not match any.
error: failed to push some refs to 'https://[email protected]/genadinik/ios_business_app.git'
而新的倉庫是在這個網址:
git remote add origin https://github.com/genadinik/iPhoneBusinessPlan.git
任何想法如何將本地引用切換到github url?
首先發出'git remote remove origin' – sestus