Last Updated: October 04, 2020
·
5.234K
· filipekiss

See no merged branches on git

So you're working on your project and want to see which features were not yet merged into the master branch. Do not fear, just checkout to master and run the following command:

git branch --no-merged master

And voilá! You'll have a list of which branches were not yet merged into your master. You can even create an alias:

git config --global alias.nm "branch --no-merged"

and then just run

git nm master

Hope it helps you :)

Related protips:

fatal: refusing to merge unrelated histories

3 Responses
Add your response

Why do you need to check out master, and then specify master as the reference branch for --no-merged?

over 1 year ago ·

@mabraham But I didn't checkout master... I just passed it as reference directly. But you can just call git branch --no-merged to use the current branch as reference without a problem :)

over 1 year ago ·

The text of your tip says to check out master first... :-)

over 1 year ago ·