On Sat, Jun 16, 2012 at 05:43:14PM +0800, lei yang wrote:

> I know below command can get which file changed between the two commit
> lyang0@lyang0-OptiPlex-755:~/git/kernel-3.4.x$ git diff --name-only
> 16d815fd230b81d49d395e91b084f0731ea6e4a2^..3e5f29bd22e597d66d9c1013a0ab190e6b48a8ba
> drivers/i2c/busses/i2c-davinci.c
> drivers/i2c/busses/i2c-tegra.c
> can we show the info with which commit changed the file ?

Use `git log` for this:

$ git log --format=%H --name-only

would output, for each commit, a SHA-1 name of that commit,
a blank name and then the list of files affected by that commit.

Note that `git log` accepts quite a number of option `git diff` supports
(since `git log` calls `git diff` in certain modes of its operation)
so read the `git log` manual for more info.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to