Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list files in specific revision in `git`?

I want to know file list in specific revision in git repository. How can I do this?

like image 672
eonil Avatar asked Mar 07 '11 02:03

eonil


People also ask

What is the command used to list the files associated with a particular commit ID?

git diff --name-only master - To list ALL changed files on current branch, comparing to master branch.


2 Answers

git ls-tree -r --name-only $REV 

for example

git ls-tree -r --name-only a27689bf7f46dc0735c5b3b6076010c87224063e 
like image 169
dannyp Avatar answered Sep 27 '22 17:09

dannyp


See dannyp's answer.

 git ls-tree -r --name-only $REV 
like image 33
Edward Z. Yang Avatar answered Sep 27 '22 16:09

Edward Z. Yang