Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想按 ID 查看提交。例如,我想知道为该 ID 提交的代码,例如:
git log <commit_id>
这将显示与此 ID 对应的已提交代码和提交消息。
git show <commit_id>
可能是您正在寻找的机器人。
@SethRobertson 的解决方案对我有用,但它显示了差异。我想看到它就像git log展示它一样。所以添加--no-patch:
git log
--no-patch
git show <commit_id> --no-patch
我从 - https://stackoverflow.com/a/31448684/1828637学到了这一点