有哪些常用的命名git分支实例的例子? [关闭]

梦想与她 提交于 2020-08-18 07:04:19

问题:

I've been using a local git repository interacting with my group's CVS repository for several months, now. 现在,我已经使用本地git存储库与我的组的CVS存储库进行了几个月的交互。 I've made an almost neurotic number of branches, most of which have thankfully merged back into my trunk. 我已经制作了一个几乎神经质的分支,其中大部分幸运地合并回我的行李箱。 But naming is starting to become an issue. 但是命名开始成为一个问题。 If I have a task easily named with a simple label, but I accomplish it in three stages which each include their own branch and merge situation, then I can repeat the branch name each time, but that makes the history a little confusing. 如果我有一个容易用简单标签命名的任务,但是我在三个阶段完成它,每个阶段都包含它们自己的分支和合并情况,那么我每次都可以重复分支名称,但这会使历史有点混乱。 If I get more specific in the names, with a separate description for each stage, then the branch names start to get long and unwieldy. 如果我在名称中有更具体的说明,并且每个阶段都有单独的描述,那么分支名称开始变得冗长而且难以处理。

I did learn looking through old threads here that I could start naming branches with a / in the name, ie, topic/task, or something like that. 我确实通过这里的旧线程学习,我可以开始用名称中的/来命名分支,即主题/任务,或类似的东西。 I may start doing that and seeing if it helps keep things better organized. 我可能会开始这样做,看看它是否有助于保持更好的组织。

What are some best practices for naming git branches? 命名git分支有哪些最佳实践?

Edit: Nobody has actually suggested any naming conventions. 编辑:实际上没有人建议任何命名约定。 I do delete branches when I'm done with them. 当我完成分支时,我会删除分支。 I just happen to have several around due to management constantly adjusting my priorities. 由于管理层不断调整我的优先事项,我恰巧有几个人。 :) As an example of why I might need more than one branch on a task, suppose I need to commit the first discrete milestone in the task to the group's CVS repository. :)作为为什么我可能需要在任务上需要多个分支的示例,假设我需要将任务中的第一个离散里程碑提交到组的CVS存储库。 At that point, due to my imperfect interaction with CVS, I would perform that commit and then kill that branch. 那时,由于我与CVS的不完美交互,我会执行该提交然后杀死该分支。 (I've seen too much weirdness interacting with CVS if I try to continue to use the same branch at that point.) (如果我在这一点上尝试继续使用相同的分支,我看到太多奇怪的事情与CVS交互。)


解决方案:

参考一: https://stackoom.com/question/19CR/有哪些常用的命名git分支实例的例子-关闭
参考二: https://oldbug.net/q/19CR/What-are-some-examples-of-commonly-used-practices-for-naming-git-branches-closed
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!