我公司的一个人是该公司的VSTS项目的管理员,为我创建了一个回购协议,并授予我在master
分支上的所有权限。如何授予Git'ForcePush'将bfg-repo-cleaner结果推送到VSTS的权限?
现在我需要在我的回购库上运行BFG Repro-Cleaner。它的工作很大本地,但是当我试图git push
我的镜像副本,我得到:
! [remote rejected] user/<someone_else>/<branch> -> user/<someone_else>/<branch> (TF401027: You need the Git 'ForcePush' permission to perform this action. Details: identity <my identity>, scope 'branch'.)
! [remote rejected] refs/pull/<number>/merge -> refs/pull/<number>/merge (TF401027: You need the Git 'ForcePush' permission to perform this action. Details: identity <my identity>, scope 'branch'.)
error: failed to push some refs to 'https://<repo>'
什么权限应该问我的管理员授予我,让我可以完成这个?她如何从VSTS网页界面做到这一点?
正如我在原来的帖子中写道,管理员这样做对我的'主'分支。但是,错误表明我在'user//'中缺少权限,这可能是管理员可以授予我的权限,也是'refs/pull//merge',我不知道。 –
Jonathan
@Jonathan你需要在所有受影响的分支上有相同的权限。当这些提交的历史被重写时,它为提交生成一个分支新的哈希标识符。因此,对于那些在此期间承诺回购的人来说,推力也会造成破坏,因为他们的提交将有不同的父提交。 –
@Jonathan另外请确保您的本地回购工作树是干净的(通过'git status'验证)。然后确保目标分支具有强制推送权限。 –