# How Do I List All the Files in a Commit?

To list all the files in a specific commit in Git, you can use the `git diff-tree` command. Here's how you can do it:

```bash
git diff-tree --no-commit-id --name-only -r <commit-hash>
```

Replace `<commit-hash>` with the hash of the commit you want to list the files for.

This command will list all the files that were affected by the specified commit. Each file will be listed on a separate line.

Alternatively, if you want to see the changes introduced by a specific commit, including the list of files and the modifications made to each file, you can use:

```bash
git show --name-only <commit-hash>
```

This command will display the commit message, followed by the list of files and the changes made to each file in the specified commit.

### Note:

- Replace `<commit-hash>` with the hash of the commit you're interested in. You can find the commit hash using `git log`.
- The `git diff-tree` command is useful for listing files without showing the actual changes, while `git show` displays both the files and the changes made in the commit.