svn:如果我完成了功能分支,我应该删除我的工作副本吗?

发布于 2025-01-01 12:24:24 字数 144 浏览 3 评论 0原文

我刚刚完成了一个功能分支并将该分支合并回主干。当我准备好在下一个分支上工作时,我现在应该删除当前的工作副本并签出全新的副本吗?

我认为这是这取决于你,因为我下次可能想签出完全不同的文件。

I've just completed a feature branch and merged the branch back into the trunk. Should I now delete my current working copy and checkout a fresh new copy when I'm ready to work on the next branch?

I would think this is a yes or it's up to you because I may want to checkout completely different files next time.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

秋心╮凉 2025-01-08 12:24:24

根据功能分支的定义 - 我将删除工作副本。但当您开始处理另一个时,您也可以切换到另一个。

By defintion of a feature branch - I would delete the working copy. But you can as well switch to a different one, when you start working on another.

倚栏听风 2025-01-08 12:24:24

由你决定。我个人只会更新到主干(或新的功能分支),而不是删除我的工作副本并签出新副本

It's up to you. I personally would just update to trunk (or to a new feature branch) instead of deleting my working copy and checking out a new copy

烦人精 2025-01-08 12:24:24

如果您是通过重新集成完成的(请参阅 Subversion 分支重新集成),那么您就位于主干上。所以这取决于你,如果你想创建一个新分支,就在主干上工作。因为主干是当前的,而且新创建的分支也是如此,所以交换机会便宜得多。

If you have done it by reintegration (see Subversion branch reintegration), you are on the trunk. So its up to you, if you want to create a new branch, work on the trunk. Because the trunk is current, and a new created branch will it be as well, a switch will be much cheaper.

一片旧的回忆 2025-01-08 12:24:24

理想情况下,我会将分支标记为“死亡”,但 SVN 尚未提供此功能。您可以删除该分支,但这也会删除该分支的修订历史记录。另一种方法是重命名分支并将诸如 DEAD 之类的内容附加到分支名称中,以明确指示该分支不应用于进一步开发。

  • 您对该分支的修订历史记录仍然可用。
  • 它将防止某人意外地将更改合并到现已死亡的分支中,因为他们的 SVN 客户端将指向以前的分支名称。

Ideally, i would have marked the branch as DEAD, but SVN does not provides this facility as yet. You can delete the branch, but then this will also delete the revision history of the branch. An alternative is to rename the branch and append something like DEAD to the branch name, to get a clear indication that the branch should not be used for further development.

  • Your revision history for the branch will still be available.
  • It will prevent someone from accidently merging their changes in the now DEAD branch, because their SVN client will be pointing to the previous branch name.
我做我的改变 2025-01-08 12:24:24

通常我在分支之后命名工作副本。这有助于我记住我在哪里进行更改(虽然多任务处理对大脑来说不是最好的事情,但它确实发生了:))。因此,当重新集成分支时,我将其删除,因为另一个分支将具有不同的名称。

一个例外 - 变化很小,删除/签出/构建需要很多时间。但为了避免混淆,这些情况应该是真正的例外。

Usually I name working copy after branch. This helps me to remember where I'm making changes (while multitasking is not the best thing for brain, it happens :) ). So when branch is reintegrated I delete it, because another branch will have different name.

An exception - the change is really little and deleting/checking out/building takes much time. But to avoid confusion, these cases should be really exceptions.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文