我在这个GitHub存储库上只有一个分支(不是主分支),现在我正在尝试将其重命名,但出现了以下错误:
git push origin :OldName
To git@github.com:user/gitRepo.git
! [remote rejected] OldName (refusing to delete the current branch: refs/heads/OldName)
error: failed to push some refs to 'git@github.com:user/gitRepo.git'
这是因为我没有主分支吗?这是我的
git branch -a
命令结果:OldName
remotes/origin/HEAD -> origin/OldName
remotes/origin/OldName