Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I find a list of files committed to a git branch?

How do I list all the files that I committed to a specific branch? I've committed about 40+ files to a branch, and I need to find the file names because I am trying to debug something, hard to do when I don't remember the file names.

git log only gives me a long list of commits but not the actual files.

like image 636
iCodeLikeImDrunk Avatar asked Jan 22 '12 21:01

iCodeLikeImDrunk


1 Answers

Have you tried git ls-tree?

git ls-tree --name-only -r <branch_name>  

--name-only gives you just the file names. -r recurses into sub directories.

If you want the name of the sub-directory listed before recursing into it, add -t to the argument list.

like image 194
Carl Avatar answered Sep 27 '22 22:09

Carl