← 返回命令列表

Linux command

git-whatchanged 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Show commit logs with diffs

git whatchanged

Show for specific file

git whatchanged [file]

Show with stat

git whatchanged --stat

Limit output

git whatchanged -n [10]

Show since date

git whatchanged --since="[2 weeks ago]"

说明

git whatchanged shows logs with the difference each commit introduces. It is similar to `git log` but defaults to showing raw diff output, making it easier to see which files were affected by each commit. This command is considered somewhat legacy; `git log` with appropriate options provides the same functionality.

参数

-n _num_
Limit number of commits.
--stat
Show diffstat.
--since _date_
Commits since date.
--until _date_
Commits until date.
-p
Show patch.

FAQ

What is the git-whatchanged command used for?

git whatchanged shows logs with the difference each commit introduces. It is similar to `git log` but defaults to showing raw diff output, making it easier to see which files were affected by each commit. This command is considered somewhat legacy; `git log` with appropriate options provides the same functionality.

How do I run a basic git-whatchanged example?

Run `git whatchanged` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -n _num_ do in git-whatchanged?

Limit number of commits.