Monday, December 29, 2014

Git Tip of the Year: Find the Most Recent Common Commit

Okay, you're working on a branch called 'awesome' and you want to know what's the most recent common commit of branch 'awesome' and 'master'.

Just run this:
$ git merge-base awesome master
And you'll get the SHA1 of the most recent common commit.

No comments:

Post a Comment