git-tips / tips

Most commonly used git tips and tricks.
http://git.io/git-tips
MIT License
21.39k stars 1.7k forks source link

Add alternative for first commit from branch #162

Closed dmlemos closed 6 years ago

dmlemos commented 6 years ago

Add an alternative to get a more descriptive commit

Main

$ git log --oneline upstream/doxie..master | tail -1
2feff7c Merge pull request #5 from git-tips/doxie

Alternative

$ git log --reverse upstream/doxie..master | head -6
commit 2feff7c446a38166007a0bc356c9e01bb4f1ac6e
Merge: dd2031c eff7432
Author: hemanth.hm <hemanth.hm@gmail.com>
Date:   Wed Jul 15 16:32:57 2015 +0530

    Merge pull request #5 from git-tips/doxie