在潜水之前,先了解一下背景知识:
几个月前,我的团队将我们的存储库从Team Foundation Server迁移到了Azure DevOps。上周,我们注意到TFS上的一个分支已经完成了它现在需要的工作。因此,我们决定将该分支机构引入Azure,以避免再次进行上述工作。
我从计算机上的TFS克隆了存储库,更改了原始URL以匹配Azure之一,然后尝试通过以下步骤推送分支:
它给了我以下错误信息:
error: remote unpack failed: error The tree object 1234 was rejected: The folder 'myfolder' and the folder 'MyFolder' pushed differ in case. You must remove or rename one of them or disable case-enforcement (see https://aka.ms/git-platform-compat). To https://urlOfRepoOnAzure ! [remote rejected] ExportBranche -> ExportBranche (The tree object 5678 was rejected: The folder 'myfolder' and the folder 'MyFolder' pushed differ in case. You must remove or rename one of them or disable case-enforcement (see https://aka.ms/git-platform-compat).) error: failed to push some refs to https://urlOfRepoOnAzure
我删除了文件夹“ myfolder”,然后重试。同样的错误。但是我完全可以解决所有问题。
我不明白发生了什么事。特别是为什么在我推销新分支后为何拒绝推销Azure。
我同意@BernardoDuarte的观点,您应该可以更改有关案件强制执行的政策,但是,如果该政策无效,我将尝试通过进行更手动的更新来摆脱整个冲突:
git status
(B)中的步骤,以确保myFolder的文件夹大小写与Azure DevOps存储库中的文件夹大小写相同。如果您覆盖myFolder本身,Git会将其作为更改进行跟踪,并尝试推送它。这种方法虽然笨拙,但可以防止这种更改的发生,因此应该绕开问题。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句