Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list all files added to the first commit of a GIT repository?

Current status: I am using git diff-tree -r HASH to list all added, modified and deleted files in a specific commit. This worked until today.

The problem: I want to list all added files in my first commit, however passing the first HASH as a parameter doesn't work. Why?

Main question: How can I get the list of all files added in my first commit?

like image 500
Lawrence Avatar asked Sep 13 '25 18:09

Lawrence


1 Answers

This works for me

git show <commit|branch-name> --name-only
like image 132
sensorario Avatar answered Sep 15 '25 11:09

sensorario