May I list the files of the current commit?

Viewed 17302

Imagine that everytime I commit files, before I push them, I'd like to list them to check. How may I do that ?

I tried:

git ls-tree -r --name-only master
git ls-files -stage

If I edit a single file, add then commit it. If I try the above codes, it shows me all my files.

I want to list ONLY the files that will be pushed on the current commit.

3 Answers
Related