VideosMy ProjectsProgramming BlogGallery
  1. Home
  2. Blog
  3. How to find a files latest changed time in git
Programming Blog

Atom/RSS Feed

git

How to find a files latest changed time in git

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
Join my mailing list