克隆过程中出现此错误
remote: warning: refname '4e810d87701e09df2949cb33e731052aa05d2c76' is ambiguous. remote: Git normally never creates a ref that ends with 40 hex characters remote: because it will be ignored when you just specify 40-hex. These refs remote: may be created by mistake. For example, remote: remote: git checkout -b $br $(git rev-parse ...) remote: remote: where "$br" is somehow empty and a 40-hex ref is created. Please remote: examine these refs and maybe delete them. Turn this message off by remote: running "git config advice.objectNameWarning false"
Senthil A Ku.. 12
在克隆过程中,我收到此错误消息,发现使用此名称创建了一个标记(如40-hex ref).
当您收到此错误时,您可以查找具有不明确值的分支或标记名称,如果不需要ref,则将其删除
$ git tag | grep 4e810d87701e09df2949cb33e731052aa05d2c76 4e810d87701e09df2949cb33e731052aa05d2c76 $ git tag -d 4e810d87701e09df2949cb33e731052aa05d2c76
funroll.. 6
在我的情况下,它是一个分支而不是标签.
要查找ref是标记还是分支:
$ git branch -a | grep 4e810d87701e09df2949cb33e731052aa05d2c76 $ git tag | grep 4e810d87701e09df2949cb33e731052aa05d2c76
请注意,您可能希望在删除分支或标记之前保存它.(当然,使用不同的名称.)
这是我如何摆脱它:
$ git branch -d 4e810d87701e09df2949cb33e731052aa05d2c76 $ git push origin :4e810d87701e09df2949cb33e731052aa05d2c76
在我的情况下,错误只出现在git clone --mirror
- 通常不是问题.