是否有一种方法可以列出更改特定文件的所有提交?


当前回答

Git日志路径应该做你想做的。从git日志手册页:

[--] <path>…

Show only commits that affect any of the specified paths. To prevent confusion with
options and branch names, paths may need to be prefixed with "-- " to separate them
from options or refnames.

其他回答

Git日志路径应该做你想做的。从git日志手册页:

[--] <path>…

Show only commits that affect any of the specified paths. To prevent confusion with
options and branch names, paths may need to be prefixed with "-- " to separate them
from options or refnames.

它应该像git log <somepath>;查看manpage (git-log(1))。

我个人喜欢使用git log——stat <path>,这样我就可以看到每次提交对文件的影响。

使用git log——all <filename>查看所有分支中影响<filename>的提交。

在Linux上,你可以使用gitk。

可以使用“sudo apt-get install git-gui gitk”进行安装。它可以通过“gitk <Filename>”来查看特定文件的提交。

如果你想查看所有修改文件的提交,在所有分支中,使用这个:

git log --follow --all <filepath>