arrow_back Back to Notebook
git
git
January 10, 2019

How to find a files latest changed time in git

You can find a files latest changed time using the following

git log -n 1 --follow --diff-filter=MR <file>

For Example

git log -n 1 --follow --diff-filter=MR README.md

How it works

  • -n 1 only show 1 result
  • --diff-filter=MR filters only Modified and Renamed commits
  • --follow follows the file through any renames it has had

Thanks for reading!

John Wiseman

Full-Stack Software Engineer building scalable digital solutions. specializing in modern web technologies and mission-critical systems.

© 2026 Wiseman Systems Pty. Ltd.

Navigation

Start a Conversation

Ready to discuss your next project? Let's build something extraordinary together.

Get in Touch