2

How to get list of changed files in a particular changeset? I expected it to be

git diff --name-only a329a7b3b85a2f23d2cc2b6c897dc30fb25fa6a5

for changes made by me in a329a7b3b85a2f23d2cc2b6c897dc30fb25fa6a5, BUT it returns the changes made in the revision that follows right after mine. So I need to find the id of previous changeset :-S

Is it expected behaviour? Why is it?!

zerkms
  • 249,484
  • 69
  • 436
  • 539
  • Omg, is it really offtopic? Please look at the `Related` questions list. – zerkms Jun 16 '11 at 12:57
  • You are getting a diff between the working directory and the given commit. – William Pursell Jun 16 '11 at 12:59
  • @William Pursell: nope, http://www.kernel.org/pub/software/scm/git/docs/git-diff.html: `This form is to view the changes you staged for the next commit relative to the named .` – zerkms Jun 16 '11 at 13:00
  • Duplicate: http://stackoverflow.com/questions/424071/list-all-the-files-for-a-commit-in-git – oyvind Jul 17 '14 at 07:17

1 Answers1

4

You want

$ git show --oneline --name-only sha

or perhaps

$ git show --format=format: --name-only sha
William Pursell
  • 204,365
  • 48
  • 270
  • 300