0

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?

Alpha
  • 13,320
  • 27
  • 96
  • 163

2 Answers2

3

Use

git diff {commit} {commit}^ --name-only
Lolito
  • 413
  • 3
  • 9
  • 1
    This looks more "gitish" than my answer ;) – hek2mgl Sep 28 '13 at 10:34
  • 1
    Sure, maybe i've not been clearly enough with syntax, sorry; braces are only there to point that is a commit, for example if tour commit SHA truncated it's cf23df: **git diff cf23df cf23df^ --name-only** – Lolito Sep 28 '13 at 16:05
0

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..

Todd A. Jacobs
  • 81,402
  • 15
  • 141
  • 199
  • Please don't use git whatchanged: it isn't well documented for a reason,http://stackoverflow.com/a/18585297/6309 – VonC Sep 29 '13 at 01:19