简体   繁体   English

如何以编程方式找到已使用git合并到master的分支?

[英]How to programmatically find branches that were merged into master with git?

I'm trying to determine the best way to programmatically determine which branches have been recently merged into master. 我正在尝试确定以编程方式确定哪些分支最近已合并到master中的最佳方法。 Ideally this script will run off a git hook, parsing the values and then do extra processing based on the results. 理想情况下,此脚本将在git钩子上运行,解析值,然后根据结果进行额外的处理。

you can use 您可以使用

git branch --merged

it will show you the list of branches merged. 它会显示合并分支的列表。 I would use what ever script to start the process then you can extract what you want from it. 我将使用任何脚本开始该过程,然后可以从中提取所需内容。

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

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