Track file Changes per Commit using Git Command

If you want to know the list of all files that were added/modified/updated or deleted for each commit in a branch, you can make use of the git log command with --name-status flag.

# git log --name-status

commit 0919b37fc90ab264f5759cd9966ef6838153f673 (HEAD -> main)
Author: Git User <>
Date:   Thu Mar 14 12:00:00 2024 +0100

    Updated and, deleted


commit 898fd171aaf7c60a108af0478cf04643d253e541
Author: Git User <>
Date:   Wed Mar 13 12:00:00 2024 +0100



commit c57cdeff4640ee0c62d5f6c796282e722b39a26b
Author: Git User <>
Date:   Tue Mar 12 12:00:00 2024 +0100

    Added and, modified


As you may see in the above example, we have 3 commits details shown using the git log command with names and details of files that were committed in each step.

Git Log name status command example

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail:

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap