使用Git版本控制查看文件的更改历史记录 [英] View the change history of a file using Git versioning
本文介绍了使用Git版本控制查看文件的更改历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何查看Git中单个文件的更改历史记录,以及已更改的完整详细信息?
How can I view the change history of an individual file in Git, complete details with what has changed?
我已经得到:
git log -- [filename]
它向我显示了文件的提交历史记录,但是我如何获取每个文件更改的内容?
which shows me the commit history of the file, but how do I get at the content of each of the file changes?
我正在尝试从MS SourceSafe过渡到过去简单的右键单击
→ show history
。
I'm trying to make the transition from MS SourceSafe and that used to be a simple right-click
→ show history
.
推荐答案
为此,我会使用:
For this I'd use:
gitk [filename]
或按照文件名重命名
or to follow filename past renames
gitk --follow [filename]
这篇关于使用Git版本控制查看文件的更改历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文