gpt4 book ai didi

git - 我应该保留功能分支还是在将它们 merge 到发布后删除它们?

转载 作者:太空狗 更新时间:2023-10-29 13:59:54 25 4
gpt4 key购买 nike

我的 git 工作流程是这样的:

1. make new feature branch from branch release.
2. developing on it, after finish it, merge it into branch testing
3. Do test with code of branch testing
4. If test passed, merge new feature branch into branch release.

但是我在这里有一个困惑,我是否应该在 merge 到发布后删除这个新的功能分支?为什么?

最佳答案

既然你知道这里的决定是基于偏好,我将分享我的。

删除分支,因为:

  1. 分支不会讲述您的开发故事, pull 请求可以
  2. 它让您更清楚地了解您的发展状况
  3. 旧分支不可避免地会变成陈旧的旧分支,您稍后必须为 1 和 2 清除这些分支

我很感激 Atlassian's Git Tutorial解释一下:

Once the release is ready to ship, Mary merges it into master and develop, then deletes the release branch. It’s important to merge back into develop because critical updates may have been added to the release branch and they need to be accessible to new features. Again, if Mary’s organization stresses code review, this would be an ideal place for a pull request.

是否订阅Git Workflow或其他方法,我支持删除分支。

关于git - 我应该保留功能分支还是在将它们 merge 到发布后删除它们?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30498538/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com