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,260 points
1,020 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,460 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,700 points
2,351 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,620 points
14,109 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,460 points
16,630 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
4,035 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,460 points
631 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,460 points

edited Nov 19, 2020 by MD 824 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP