0

How can I list changes done as part of a particular commit in the format below?

repo: agrawalo/interviewing
branch: master 
commit: c917020b 

Batman! This commit has no parent

author: Lokesh Agrawal at 2018-05-16T20:58:17+05:30 

Summary of changes:
pom.xml | 10 +++
+ src/main/java/DBTest.class | 10 +++--
+ src/main/java/DBTest.java  | 8 +++-
src/main/java/com/interviewing/Application.java | 8 ++++
+ src/main/java/com/interviewing/constant/QuestionArea.java | 88 +++-
+ src/main/java/com/interviewing/controller/QuestionController.java | 78 +++--
src/main/java/com/interviewing/entity/Question.java | 17 ++++++
src/main/java/com/interviewing/entity/Skill.java | 23 ++++++++
src/main/java/com/interviewing/repository/QuestionRepository.java | 37 ++++--
+ src/main/java/com/interviewing/repository/SkillRepository.java | 9 ++++++-
+ src/main/java/com/interviewing/service/QuestionService.java | 11 ++++++-
+ src/main/java/com/interviewing/service/QuestionServiceImpl.java | 20 ++++--
src/main/resources/application.properties 13 ++++++
+ src/test/java/com/interviewing/repository/QuestionRepositoryTest.java | 23 +++-----

n files changed, x insertions(+), y deletions(-)

I have tried

git show --name-only #commithash

commit eaf678f74e35affaeaa21a0df5bf086e804bcad5
Author: Lokesh Agrawal <agrawalo@deshaw.com>
Date:   Fri May 11 12:23:27 2018 +0530

Batman! This commit has no parent

.gitignore
mvnw
mvnw.cmd
pom.xml
src/main/java/com/interviewing/Application.java
src/main/java/com/interviewing/entity/InterviewMatrix.java
src/main/java/com/interviewing/entity/Question.java
src/main/java/com/interviewing/repository/InterviewMatrixRepository.java
src/main/java/com/interviewing/repository/QuestionRepository.java
src/main/resources/application.properties
src/test/java/com/interviewing/StructuredInterviewingApplicationTests.java

But it doesn't have an indication on whether files are newly added or something has changed in existing files.

ThinkGeek
  • 4,749
  • 13
  • 44
  • 91
  • 1
    Possible duplicate of [How to list all the files in a commit?](https://stackoverflow.com/questions/424071/how-to-list-all-the-files-in-a-commit) – phd Jun 05 '18 at 06:13

3 Answers3

0

git show --name-only should do what you want.

EDIT:
git show --name-status will also show an indication of what changed in the file. E.g. "A" is added and "M" is modified.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
  • Updated the question with the output of git show --name-only, and reason behind why this doesn't help. – ThinkGeek Jun 05 '18 at 06:47
  • Is there a way to change A to +. And have a summary at the bottom. Something like: "1 file changed, 2 insertions(+), 2 deletions(-)" – ThinkGeek Jun 05 '18 at 06:59
0

Try git show --name-status


note : --name-only and --name-status are also valid options for git diff, git log, and a few other git commands

LeGEC
  • 46,477
  • 5
  • 57
  • 104
0

I don't know if this is exactly what you want, but you can see list of files modified as part of commit using following command:

git log --stat

This will list down all the commits with list of files modified for each commit.