在 Git 中查找提交 ID 的提交日志

我想查看 ID 提交。例如,我想知道为这个 ID 提交的代码,比如:

git log <commit_id>

这将显示与此 ID 对应的提交代码和提交消息。

131635 次浏览
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