简体   繁体   English

如何管理 github 上的过时分支

[英]how to manage obsolete branches on github

I usually develop new features of my codes in dedicated branches, then merge them to master.我通常在专门的分支中开发我的代码的新特性,然后将它们合并到 master。

The problem with this is that after some time I have a lot of obsolete branches that are cluttering the github interface, where there might be instead branches which are actively developed.这样做的问题是,一段时间后,我有很多过时的分支使 github 接口变得杂乱无章,其中可能有正在积极开发的分支。

Is there a way to archive them somehow, or should I just delete them, as the commits have already been merged?有没有办法以某种方式归档它们,或者我应该删除它们,因为提交已经合并?

If you have already merged branches and have no need to develop on them anymore, then it's safe to delete them.如果您已经合并了分支并且不再需要在它们上进行开发,那么删除它们是安全的。 You don't loose any commit, as they have been merged and are now stored in master.您不会丢失任何提交,因为它们已被合并并且现在存储在 master 中。

I would only propose to leave branches you actively develop我只建议离开你积极开发的分支

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM