DEV Community

Cover image for List all files changed in last commit
Adam K Dean
Adam K Dean

Posted on

1 1

List all files changed in last commit

List all files changed in the last commit by using git diff-tree on HEAD.

git diff-tree --no-commit-id --name-only -r HEAD
Enter fullscreen mode Exit fullscreen mode

For example, if you changed README.md in your last commit:

adam@macbook:project (master) $ git diff-tree --no-commit-id --name-only -r HEAD
README.md
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started