查看特定的Git提交 [英] View a specific Git commit

查看:76
本文介绍了查看特定的Git提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


可能存在重复:

获取关于SHA-1提交对象的信息?

我需要检查特定更改何时添加到正在处理的文件中,因此我使用了 git blame 命令。从那里我获得了相关提交的散列。 有没有办法使用散列查看该提交的日志记录?所有文档都讨论如何查看整个树。

I needed to check when a specific change was added to a file I'm working on, so I used the git blame command. From that I obtained the hash of the relevant commit. Is there a way to see the log notes of just that commit, using the hash? All the docs talk about how to look at the whole tree.

我意识到可以只执行 git log< filename> ,但是文件有很多提交,我不愿意通过所有文件寻找这一个。

I realize could just do git log <filename>, but there are a lot of commits for the file, and I'm loathe to go through all of them looking for this one. A simple way to view the log notes would be appreciated.

推荐答案

git show <revhash>

文档这里
或者如果这不起作用,请尝试 Google Code的GIT文档

这篇关于查看特定的Git提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆