TFS中的孤立分支 [英] Orphaned Branches in TFS

查看:63
本文介绍了TFS中的孤立分支的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在TFS中有一个主干,每个人都要工作,直到需要分支为止.我们的最后一个项目是一个大型功能,需要一个分支.现在,开发已经完成,更改已合并回主干.开发部门应该怎么办?

We have a trunk in TFS that everyone works off until we have a need to branch. Our last project was a large feature that required a branch. Now that the development has been completed and the changes have been merged back into the trunk. What should happen to the development branch?

我应该删除它吗?以某种方式将其标记为只读?伪装和锁定怎么办?

Should I delete it? Mark it as read-only somehow? What about cloaking and locking?

推荐答案

可以将分支设置为只读.您只需要从相应的组中删除签入/签出权限.请注意,第一次刷脸看起来没有什么不同,但是当您尝试检出文件时,将被阻止.

You can make a branch read-only. You just need to remove the check-in/check-out permissions from the appropriate groups. Note that it doesn't look any different on first blush, but when you attempt to check out a file, you'll be prevented.

我总是最终删除分支.它已被删除",但是没有什么阻止您取消删除它(与销毁不同)或回顾代码.除非您努力销毁它,否则它实际上不会走到任何地方.

I always end up deleting the branch. It's "deleted" but there's nothing preventing you from undeleting it (which is different that destroying) or looking back at the code. It doesn't actually go anywhere unless you go through the effort of destroying it.

此外,如果您有 Team Foundation Sidekicks 这样的工具,您仍然可以查看所有分支历史记录,即使它已被删除.

In addition, if you have a nice tool like Team Foundation Sidekicks, you can still see all of the branching history, even if it's been deleted.

就像@Ray所说的那样,您可以保留它,但是如果您在十几个分支的过程中执行此操作,则事情将变得难以管理.如果分支已死,并且您已将代码合并到主线中,除了以防万一"之外,您是否有其他目的来保留它.

You can, as @Ray says, just leave it, but if you do that over the course of a dozen or so branches, things become a bit unwieldy to manage. If the branch is dead, and you've merged the code into mainline, do you have any purpose for keeping it around aside from "just-in-case."

如果是这样,仅在确实需要时将其删除并重新浏览即可.

If so, just delete it and dig back through it only if you really have to.

这篇关于TFS中的孤立分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆