Thursday, October 9, 2014

Getting unique commits in a branch ..well almost

To list unique commits in a branch
git log --first-parent --no-merges
For more details checkout http://stackoverflow.com/questions/5720343/using-git-show-all-commits-that-exist-only-on-one-specific-branch-and-not-a
Then you can format the output as follows
git log --first-parent --no-merges --pretty=format:"%H %s"
Then you get something like
3d6995f61c1359e44c98433bb5ed4251798002c3 My Commit

No comments:

Post a Comment