Orphaned Branches in TFS

前端 未结 3 1765
清酒与你
清酒与你 2021-02-20 04:20

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 com

相关标签:
3条回答
  • 2021-02-20 04:38

    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.

    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.

    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.

    0 讨论(0)
  • 2021-02-20 04:46

    Just leave it. :) You can delete the branch but it will still remain in the repository. It really is a decision that you and your team can make to follow your source control guidelines.

    On a side note, there is no read-only option in TFS, you can only leave it, delete it or run the TFS destroy command to permanently remove the branch.

    0 讨论(0)
  • 2021-02-20 04:52

    There is a Read access control permission. If you set Contributors to "Deny", it should override any "Not Set" or "Allow" permissions. You can set it in Source Control Explorer by right-clicking on the folder and going into Advanced | Security...

    0 讨论(0)
提交回复
热议问题