Question

For particular commit, I want to see what files have been modified/added. Is there a git command which will list all files that have been modified/added for particular commit?

Was it helpful?

Solution

Use

git diff {commit} {commit}^ --name-only

OTHER TIPS

Use git-whatchanged

See the git-whatchanged(1) man pages. For example:

$ git whatchanged --max-count=1 76ca0a8
commit 76ca0a8d36ad764cae050430c63b0cbc28e6493f
Author: John Doe <john.doe@example.com>
Date:   Mon Sep 16 12:23:42 2013 -0400

    Add Ruby version and gemset files.

:000000 100644 0000000... eaec1d0... A  .ruby-gemset
:000000 100644 0000000... abf2cce... A  .ruby-version

The lines with colons at the bottom show files that are added, modified, deleted, or whatever. See also the --name-only flag defined in git-log(1) for a less verbose list of filenames related to the commit..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top