簡體   English   中英

Github 存儲庫中的錯誤(“找不到遠程引用主”)

[英]Error in the Github repository ("Couldn't find remote ref main")

在這里,我嘗試了幾次來制作同一行代碼,以防萬一我犯了一些“錯字”,但我發現它沒有效果,我真的不知道該怎么做,我是初學者,我只是讓我的github 上的第一個存儲庫。

MacBook-Air-de-leuxeren:github leux$ git pull -f origin main
Warning: Permanently added the ECDSA host key for IP address '140.82.114.3' to the list of known hosts.
Enter passphrase for key '/Users/leux/.ssh/id_ed25519': 
fatal: Couldn't find remote ref main

Macbook 終端中的代碼圖像

另一種選擇是:

git fetch
git branch -avv
git switch aBranch

默認的 refspec ( +refs/heads/*:refs/remotes/origin/* ) 將獲取所有遠程分支。

選擇一個並切換到它

如果<branch>沒有找到,但在一個遠程(稱為<remote> )中確實存在一個具有匹配名稱的跟蹤分支,則視為等同於

$ git switch -c <branch> --track <remote>/<branch>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM