显示文件的历史? [英] Show history of a file?
问题描述
可能的重复:
使用 Git 版本控制查看文件的更改历史一个>
有时我想单步查看特定文件的历史记录.过去我使用 P4V,这非常快速和直观.
Sometimes I want to step through the history of a particular file. In the past I used P4V and this was very quick and intuitive.
- 右键单击文件并选择历史记录.
- 滚动日期并查看那个日期在那个文件中发生的变化的很好的差异.很简单.
- Right click on a file and select history.
- Scrolling through the dates and see a nice diff of exactly what changed in that file on that date. Simple.
现在切换到 git 是一项艰巨的任务.
Switching to git this is now a grueling task.
- "git 日志文件名"
- 查看历史并选择日期,复制哈希
- "git diff 哈希"
- 滚动查看我感兴趣的文件中发生更改的内容的差异.
- 不,不是这样,让我们尝试不同的日期 - 回到第 2 步,冲洗并重复.
我搜索了 SO,并尝试了一些常用的 gui:github、gitk、gitg、git-gui.
I've searched SO, and I've tried a few of the commonly suggested guis: github, gitk, gitg, git-gui.
这些都消除了手动运行命令的需要,但工作流程是相同的.查看文件历史记录;查看提交;搜索大量不相关文件的差异.它缓慢且重复.
These all remove the need to manually run commands, but the workflow is the same for this. View history of file; view commit; search through diff of lots of irrelevant files. It's slow and repetitive.
所有数据都在存储库中,所以我认为这个简单的常见用例没有理由不能更加精简.
All the data is in the repo so I see no reason this simple common use case could not be more streamlined.
谁能推荐一个可以执行此操作的工具 - 或者更有效的方式来利用命令行来做我想做的事?
Can anyone recommend a tool that does this - or a more efficient way to utilize the command line to do what I want?
感谢您的任何建议.
推荐答案
你有没有试过这个:
gitk path/to/file
这篇关于显示文件的历史?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!