【发布时间】:2011-04-29 10:43:48
【问题描述】:
我有一个位于 UNC \machine\share ....etc 上的基础存储库。 我有一个本地克隆,我在主分支中工作,偶尔会合并到“稳定”分支。
通常我会做一个
git push --all
将所有分支中的所有更改移动到服务器。创建新分支后
git branch MultiCompany
然后将其推送到服务器
git push --all
它也在服务器上创建分支。我做了一些工作,提交了多公司分支中的所有更改,然后尝试做一个
git push --all
并得到以下错误:
cdturner@OAHU ~/desktop/git sourcetree/maerekai.web.framework (multicompany)
$ git push --all
Counting objects: 28, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (22/22), done.
Writing objects: 100% (23/23), 11.34 KiB, done.
Total 23 (delta 8), reused 0 (delta 0)
Unpacking objects: 100% (23/23), done.
error: Ref refs/heads/multicompany is at bd5a32df35ce8d5ae30ce999af34c4c5f35581df but expected 0000000000000000000000000000000000000000
remote: error: failed to lock refs/heads/multicompany
To //pluto/users/cdturner/Git repositories/Maerekai.web.framework.git
! [remote rejected] multicompany -> multicompany (failed to lock)
error: failed to push some refs to '//pluto/users/cdturner/Git repositories/Maerekai.web.framework.git'
我尝试使用git reset --hard HEAD^ 退出最后一次提交
然后重试推送.....
cdturner@OAHU ~/desktop/git sourcetree/maerekai.web.framework (multicompany)
$ git push --all
Total 0 (delta 0), reused 0 (delta 0)
error: Ref refs/heads/multicompany is at bd5a32df35ce8d5ae30ce999af34c4c5f35581df but expected 0000000000000000000000000000000000000000
remote: error: failed to lock refs/heads/multicompany
To //pluto/users/cdturner/Git repositories/Maerekai.web.framework.git
! [remote rejected] multicompany -> multicompany (failed to lock)
error: failed to push some refs to '//pluto/users/cdturner/Git repositories/Maerekai.web.framework.git'`
【问题讨论】: