Search code examples
gitgit-commitgit-diff-tree

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?


Solution

  • This works for me

    git show <commit|branch-name> --name-only