简体   繁体   中英

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. Ideally this script will run off a git hook, parsing the values and then do extra processing based on the results.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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