How to list all the files in a commit in Git

0 votes
Hi Guys,

I want to list of all files that were part of the commit, with no extra information. How to do that with a simple git command?
Dec 22, 2020 in Git & GitHub by akhtar
• 38,170 points
107 views

1 answer to this question.

0 votes

Hi@akhtar,

Using git diff-tree is considered as a preferred way of listing files in a commit as it is a plumbing command. It is used to compare the content and mode of blobs found via two tree objects.

$ git diff-tree --no-commit-id --name-only -r <sha1-commit-hash>
answered Dec 22, 2020 by MD
• 95,200 points

Related Questions In Git & GitHub

0 votes
1 answer

How to solve the ‘Git commit -a error’?

This happens when no editor is set. ...READ MORE

answered Jul 5, 2018 in Git & GitHub by Tyrion anex
• 8,660 points
852 views
0 votes
1 answer

How to forcefully commit a file to Git even if the file is ruled as unchanged?

This is simple, just follow the below ...READ MORE

answered Jul 11, 2018 in Git & GitHub by Sophie may
• 10,550 points
2,325 views
0 votes
1 answer

How to find the hidden files in the Git repository?

Hi@akhtar, To find the hidden files in the ...READ MORE

answered Nov 19, 2020 in Git & GitHub by MD
• 95,200 points
921 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
1,127 views
+2 votes
1 answer
0 votes
1 answer

How to list all the saved stashes in Git?

Hi@akhtar, In Git, the stash operation takes your ...READ MORE

answered Nov 20, 2020 in Git & GitHub by MD
• 95,200 points
76 views
0 votes
1 answer

How to set a username in the Git server?

Hi@akhtar, In the Git server, you need to ...READ MORE

answered Nov 19, 2020 in Git & GitHub by MD
• 95,200 points

edited Nov 19, 2020 by MD 63 views