git clone 时报错warning: remote HEAD refers to nonexistent ref, unable to checkout
一般是远程仓库默认分支(HEAD)指向了一个不存在的分支,或无该分支
解决方案(任选其一):
1、明确指定分支clone
git clone -b <branch_name> <repository_url>
2、修改默认分支后clone
git push origin --set-upstream <new_branch_name>
查看远程分支
git remote show origin

浙公网安备 33010602011771号