Looking for a git command which displays commits in a branch that are not merged to master yet, preferably with hash, date, author name and comment.
(This probably is a duplicate question but I couldn't find it on SO)
To list commits that are not on master
but only only on branch
:
git log master..branch
It does not matter which branch is checked out, as you specify the range. Git will find the shortest route from master
to branch
, first going back on master
, not printing the commits, and then listing commits when going forward in history towards branch
.
The default format of git log
contains all the data you wish to see. But I'd use the --decorate
option too, to highlight branches and tags.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With