其他分享
首页 > 其他分享> > [Git[ 解决 git branch -M main error: refname refs/heads/master not found

[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

标签:git,heads,refs,master,branch,main
来源: https://blog.51cto.com/u_15274085/2919323