Look up commit log for commit ID in Git
I want to look at a commit by ID. For instance, I want to know the code that got committed for that ID, something like:
git log <commit_id>
And this would display the committed code and commit message that corresponds to this ID.
git show <commit_id>
is the droid you are looking for, probably.
@SethRobertson's solution works for me but it shows a diff. I wanted to see it exactly like git log
shows it. So add --no-patch
:
git show <commit_id> --no-patch
I learned this from - https://stackoverflow.com/a/31448684/1828637