Search code examples
bashgitgit-diffgit-log

List of all files in a commit for every commit


I'd like to know the name and status of every file in every commit, if the same file is modified twice then it should appear twice in the list.

The following command only prints each file once.

git diff --name-status <START> <END>

Solution

  • You'd have to output info on a series of commits here, not on a diff, so your diff command seems not to be the best tool.

    I'll suggest the following (feel free to adapt the format, or even use --pretty=format:"" to just output files lists (one per commit)

    git log --name-status --pretty=format:"%h %s" <start>^..<end>