Git : List all unmerged changes in git

对着背影说爱祢 提交于 2019-11-28 15:06:34

问题


Creating a branch for various topics, and not regularly deleting them when I don't need them any more, I have now ended up with about 50 branches ;)

I tried deleting branches and some of them have unmerged changes.

What I want is the ability to see exactly what changes are there in any branch on my repo that are not in the master. Is there a way to do that

Thanks in advance.


回答1:


To list branches with commits not merged into master:

git branch --no-merged master

To list the relevant commits:

git cherry -v master <branch>



回答2:


I came across this question when I was trying to remember the syntax of...

git log <branch> --not master --stat

This will show commits to <branch> that have not been merged to master. The --stat will include the files that were changed with the commits. You can also use this to compare any two branches by replacing master with a different branch name.




回答3:


It is quite easy to get an overview of your branches with gitk.



来源:https://stackoverflow.com/questions/3600728/git-list-all-unmerged-changes-in-git

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