[Git[ 解決 git branch -M main error: refname refs/heads/master not found


當初始化一個github項目的時候

按照github提示執行到

git branch -M main

 

返回錯誤:

error: refname refs/heads/master not found

 

解決:

git add .

git commit -m "init"

 

然后在執行

git branch -M main


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM