版本控制:合并后删除分支? [英] Version control: delete branches after merging?

查看:30
本文介绍了版本控制:合并后删除分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你对一些代码进行分支时,完成与分支的工作,并将其合并回主干,你对分支做什么?从存储库中删除它?保留以供参考?

When you branch some code, finish working with the branch, and merge it back to the trunk, what do you do with the branch? Delete it from the repository? Keep it for reference?

您似乎会保留它以供参考,但我想 /branches 目录可能会变得非常混乱.

It seems like you would keep it for reference, but I imagine the /branches directory could get pretty cluttered.

(如果这不是人们普遍认同的,请发表评论,我会将其设为社区维基.)

(If this isn't something people generally agree on, please comment and I'll make it a community wiki.)

jleedev 是对的 - 我们应该指定我们正在谈论的版本控制系统.

jleedev is right - we should specify which version control system we're talking about.

我想到了 Subversion,但也希望听到有关其他系统的回应.请指明您要回答的是哪一个,或者,<贿赂>如果您想得到公认的答案</bribery>,请比较和对比几个系统.

I had Subversion in mind, but would love to hear responses regarding other systems, too. Please specify which one you're answering about, or, <bribery>if you want to get the accepted answer</bribery>, compare and contrast several systems.

推荐答案

我删除了重新集成的分支,因为我不再需要它们.无论如何,Git 和 Mercurial 都会保留分支/合并历史记录.在 subversion 中,我会保留旧分支以引用提交历史.

I remove reintegrated branches since I do not need them any more. Git and Mercurial keep branching/merging history anyway. In subversion I'd keep old branches to have a reference to commit history.

这篇关于版本控制:合并后删除分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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