0

I have seen a lot of tutorials but I haven't found any code for getting all the files and folders in a particular commit id. Thanks in advance.

user_5678
  • 17
  • 4
  • 1
    Does this answer your question? [How to list all the files in a commit?](https://stackoverflow.com/questions/424071/how-to-list-all-the-files-in-a-commit) – Pramod Mar 16 '20 at 12:24
  • 1
    How about this? https://stackoverflow.com/questions/46727610/how-to-get-the-list-of-files-as-a-part-of-commit-in-jgit. Also note that git does not bother itself about folders but only files. – alainlompo Mar 16 '20 at 12:35

1 Answers1

0

Try this,

git show --pretty="" --name-only bd61ad98    
Pramod
  • 1,031
  • 3
  • 13
  • 26
  • I want to Jgit code but not GitHub commands – user_5678 Mar 16 '20 at 12:27
  • I want to get list of folders and files with commit id by using java code using jgit. I tried a lot of tutorials but it is not working. Please help me, thanks in advance. – user_5678 Mar 18 '20 at 05:00