0
我對git有點新,因此我陷入了混亂。我有一個Xcode 4.5項目。在命令行中,我一直在管理其本地git repo,以及github上的遠程回購,即本地鏈接。一切都很好,直到我決定刪除GitHub網站上的遠程回購(稱爲PictureFly)並在GitHub網站(稱爲PhotoFly)上創建一個新的遠程回購。我希望我的本地倉庫與舊的遠程倉庫(PictureFly)斷開鏈接,並鏈接到新的遠程倉庫(PhotoFly)。似乎很簡單,但無論我輸入什麼命令,我都會收到一條致命警告或其他警告。下面是一個典型的例子就是我一直在做:無法更改我的遠程回購
我試圖刪除舊的遠程產地:
//first attempt
git push origin :https://github.com/jac300/PictureFly.git
//first error
fatal: remote part of refspec is not a valid name in
:https://github.com/jac300/PictureFly.git
//second attempt
git push origin :PictureFly.git
//second set of errors
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
//third attempt
git push origin --delete PictureFly
//third set of errors
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
//fourth attempt
git push origin --delete https://github.com/jac300/PictureFly.git
//fourth set of errors
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
後來我想也許我可以再補充新的遠程回購:
git remote add origin https://github.com/jac300/PhotoFly.git
fatal: remote origin already exists. //how does it already exist?
那麼既然「已經存在」我試圖推到回購:
git push -u origin master
fatal: 'git' does not appear to be a git repository
fatal: Could not read from remote repository.
我沒有IDE一個正在發生的事情或如何解決它。任何幫助表示讚賞。
謝謝你太多了!正是我需要的! – jac300