合并到母版后自动删除git分支 [英] Automatically delete git branch after merge to master

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

问题描述

我们将在github中尝试工作流程,其中每张票证都是master的一个分支.
票证完成后,将工作合并到暂存阶段,在此阶段将进行回归和集成测试,然后再将其合并到母版中.

We will be attempting a work flow in github where every ticket is a branch off of master.
After the ticket is complete, the work is merged into staging where regression and integration tests are performed before it is merged into master.

在合并将开始建立之后,团队负责人提出了旧票务分支的问题.

A team lead brought up the issue of the old ticket branches after a merge will start to build up.

我找到了脚本,想知道这是否可行在我们的环境中.我们只想删除已经合并到master中的分支.

I found this script and want to know if this would work in our environment. We only want to delete branches that have been merged into master.

推荐答案

据我所知,您的用例没有现成的脚本.您必须为此创建自己的工具.

There's no ready-to-use script for your use case as far as I know. You'll have to create your own tools for that.

文森特·德里森(Vincent Driessen)有一个名为 git-flow 的工具,该工具旨在帮助开发人员遵循git 成功的Git分支模型" .

There is a tool called git-flow by Vincent Driessen which was built to assist developers following his git workflow described in "A successful Git branching model".

这并不像合并后仅删除分支那样容易,因为您永远不知道是否会遇到合并冲突.

It's is not as easy as just deleting the branch after merge because you never know if you'll run into a merge conflict or not.

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

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