mrb*_*lah 125 git timeline git-diff git-log revision-history
使用Subversion,我可以使用TortoiseSVN来查看文件的历史记录/日志.
我怎么能用Git做到这一点?
只查找特定文件的历史记录,然后比较不同版本的能力.
Chr*_*ian 148
使用git log查看提交历史.每个提交都有一个关联的修订说明符,它是一个哈希键(例如14b8d0982044b0c49f7a855e396206ee65c0e787和b410ad4619d296f9d37f0db3d0ff5b9066838b39).要查看两个不同提交之间的差异,请使用两个提交git diff的修订说明符的前几个字符,如下所示:
# diff between commits 14b8... and b410...
git diff 14b8..b410
# only include diff of specified files
git diff 14b8..b410 path/to/file/a path/to/file/b
Run Code Online (Sandbox Code Playgroud)
如果要概述提交提交时发生的所有差异,请使用git log或git whatchanged使用patch选项:
# include patch displays in the commit history
git log -p
git whatchanged -p
# only get history of those commits that touch specified paths
git log path/a path/b
git whatchanged path/c path/d
Run Code Online (Sandbox Code Playgroud)
bau*_*ack 93
看起来你想要git diff和/或git log.还可以看看gitk
gitk path/to/file
git diff path/to/file
git log path/to/file
Run Code Online (Sandbox Code Playgroud)
小智 30
你也可以使用tig作为一个很好的,基于ncurses的git存储库浏览器.要查看文件的历史记录:
tig path/to/file
Run Code Online (Sandbox Code Playgroud)
Jak*_*ski 11
许多Git历史浏览器,包括git log(和'git log --graph'),gitk(在Tcl/Tk中,在Git中的一部分),QGit(在Qt中),tig(到git的文本模式接口,使用ncurses),Giggle(在GTK +),TortoiseGit和git-cheetah支持路径限制(例如gitk path/to/file).
| 归档时间: |
|
| 查看次数: |
146073 次 |
| 最近记录: |