[英]git-tf tells me “Could not lock” when checking in; how can I fix it?
I'm using git-tf to push to a TFS project. 我正在使用git-tf推送到TFS项目。 Sometimes, when I try to check one or more commits into TFS, I get a message like this:
有时,当我尝试将一个或多个提交检入TFS时,我收到如下消息:
Connecting to TFS...
连接到TFS ......
Checking in to $/MyProject: 0%签入$ / MyProject:0%
git-tf: Could not lock $/MyProjectgit-tf:无法锁定$ / MyProject
What does this mean? 这是什么意思? What's keeping me from locking?
是什么阻止我锁定? And how can I fix this?
我该如何解决这个问题?
Why it happens 为什么会这样
With standard TFS usage, you're only checking in one commit at a time. 使用标准TFS时,您一次只能检入一个提交。 But with Git, you could have a series of commits that you push all at once.
但是使用Git,你可以进行一系列的提交,你可以同时推送所有提交。
Because of that, git-tf strives to keep your set of commits atomic. 因此,git-tf努力使你的提交集保持原子性。 If someone checks in while you're checking in, the history can get mixed up;
如果有人在您办理登机手续时办理登机手续,那么历史可能会混乱; it won't be merged properly.
它不会被正确合并。
To prevent this, git-tf temporarily locks the entire source tree while it checks in. It can't do this, though, if somebody else has parts of the source tree locked already. 为了防止这种情况,git-tf会在签入时临时锁定整个源树 。但是,如果其他人已经锁定了源树的某些部分,则无法执行此操作。
How not to fix it 怎么不解决它
You'll see the --no-lock argument recommended in some places: 你会在某些地方看到--no-lock参数:
git tf checkin --no-lock
This is not a good solution. 这不是一个好的解决方案。 It ignores the potential scrambled-history problem instead of solving it.
它忽略了潜在的扰乱历史问题,而不是解决它。
How to fix it 如何解决它
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.