问题描述
我们有一个相当大的GIT repo,我想删除那些从未合并回master的分支。
反过来也好 - 列出的方法所有分支在某个时间点都被合并到了主分支中。
我想要一个列表开始,而不是马上删除分支,因为有些分支可能会值得保留或最近在开发中。
所以问题是:是否有办法列出所有从未将它们的任何更改合并回来的分支 master ?
git branch --no-merged master
或者换句话说, git branch --merged master
We have a fairly large GIT repo and I would like to remove branches that were never merged back into master.
The reverse is fine too - a way to list all branches that have been merged into master at some point.
I would like a get a list to begin with rather then simply deleting the branches right away, since some branches may be worth keeping still or have been in development more recently.
So the question is: Is there a way to list all branches that never had any of their changes merged back into master?
git branch --no-merged master
Or for the other way, git branch --merged master
这篇关于Git:如何找到所有从未合并回主的分支的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!