更新时间:2022-06-22 22:46:09
***实践: 开发人员可以通过右键单击给定文件夹/分支,选择签入挂起的更改".对于该签入操作,待定更改"视图将暂时排除"在该文件夹/分支之外所做的任何更改,直到您完成签入.
Best practice: A developer can check in pending changes limited to a given folder/branch by right-clicking the folder, choosing "Check in pending changes". For that check-in action, the "Pending Changes" view will temporarily "exclude" any changes made outside of that folder/branch until you complete the check-in.
是否可以阻止:根据 Microsoft,有一个预制的签入策略选项,称为强制签入以仅包含属于当前解决方案的一部分的文件".假设您使用解决方案",这可能对您有用.
Can it be prevented: Per Microsoft, there is a premade Check-in Policy option known as "Enforce check-in to only contain files that are part of current solution". This may work for you, assuming you use "Solutions".
为什么允许这样做:我想这就是 TFS 的设计方式.我怀疑这与将分支视为文件夹有关,并允许跨文件夹签入泄漏到允许跨分支签入.
Why is this allowed: I suppose it's just how TFS was designed. I'd suspect it's to do with the treatment of branches as folders, and allowing check-in's across folders leaks into allowing check-in's across branches.