git log 的用法,具体参考 git log --help,以下是个人在使用中遇见的问题,略作统计。
查看单个文件的修改差异(类似于查看单个文件的log,同时将每次log 的详细记录都显示出来):
--full-diff
Without this flag, git log -p <path>...
shows commits that touch the specified paths, and diffs about the same specified paths. With this, the full diff is shown for commits that touch the specified paths; this means that "<path>…" limits only commits, and doesn’t
limit diff for those commits.
$ git log -p <path>... test.c $ git log -u <path>... test.c $ git log -patch <path>... test.c
具体查看,结合使用 -p --stat 效果更清晰,详细参考git-log help的COMMAN DEFF OPTIONS:
$ git log -p --stat <path>...test.c
git log 的用法很多,慢慢累积,也在此慢慢记录。
git log 积累,码迷,mamicode.com
时间: 2024-10-12 03:53:13