Show all branches merged to Master between 2 dates - Git

与世无争的帅哥 提交于 2021-02-11 14:13:58

问题


With git log I can use --since and --until to show data between 2 dates. And with git branch -r I can extract all the remote branches.

How would I show all branches merged to master between 2 dates?

git log --since "DEC 1 2019" --until "JAN 1 2020" --pretty=format:"%h %an %ad"

This returns all commits between 2 dates but I'd like to return the branch names between these 2 dates that were merged to master?

Thanks in advance.


回答1:


You can try with the --merges and the --date flags for git log. So it will look like:

git log --merges --date=iso --since "DEC 1 2019" --until "JAN 1 2020" --pretty=format:"%h %an %ad"


来源:https://stackoverflow.com/questions/59667932/show-all-branches-merged-to-master-between-2-dates-git

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!