GIT-LAST-MODIFIED(1)

✨ git-last-modified(1) ✨

okay so bestie, welcome to git-last-modified β€” it's a manual page, it's a vibe, it's giving "detective but make it git" πŸ’… (the official manual name is git-last-modified(1), fyi, in case you were wondering what to call it at parties πŸŽ€)


🌸 NAME 🌸

git-last-modified β€” EXPERIMENTAL: shows you when files were last modified πŸ•΅οΈβ€β™€οΈβœ¨


πŸ¦‹ SYNOPSIS πŸ¦‹

git last-modified [--recursive] [--show-trees] [--max-depth=<depth>] [-z]
                  [<revision-range>] [[--] <pathspec>...]

no cap, that's the whole shape of it 🫢


πŸ’– DESCRIPTION πŸ’–

So what does it do? It shows which commit last modified each of the relevant files and subdirectories πŸ”₯ A commit that renames a path also counts, and so does a commit that changes the path's mode β€” everything's taken into account, we're being thorough πŸ’…

⚠️ THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE. ⚠️ like, genuinely β€” it's not settled yet, so don't come for me if it shifts on you 😭

✨ OPTIONS ✨

  • -r, --recursive β€” recursively traverse into all the subtrees 🌳 By default the command only shows tree entries that match the <pathspec>. With this option it descends into subtrees and displays all the entries inside them. It's exactly equivalent to --max-depth=-1 ⭐
  • -t, --show-trees β€” show tree entries even when it's recursing into them πŸ‘€
  • --max-depth=<depth> β€” for each pathspec you give on the command line, traverse at most <depth> levels into subtrees. A negative value means no limit πŸš€ The default is 0, which shows all paths matching the pathspec without descending into subtrees β€” so chill, it's not going digging unless you ask 🧚
  • -z β€” terminate each line with a NUL character instead of a newline 🫢 (yes, that's the whole personality of this flag)
  • <revision-range> β€” only traverse commits in the specified revision range. When no <revision-range> is specified, it defaults to HEAD (i.e. the whole history leading to the current commit) πŸ’œ For the complete list of ways to spell <revision-range>, see the Specifying Ranges section of gitrevisions(7) πŸ“–
  • [--] <pathspec>... β€” show the commit that last modified each path matching <pathspec>. If you don't give a <pathspec>, all files and subdirectories are included πŸ’– See gitglossary(7) for the details on pathspec syntax, iykyk 🌈

πŸŽ€ OUTPUT πŸŽ€

The output is in this format:

<oid> TAB <path> LF

If a path contains any special characters, the path is C-style quoted πŸ™ˆ To avoid the quoting, pass option -z to terminate each line with a NUL:

<oid> TAB <path> NUL

there you go, delicious, parsed 🌸


πŸ‘‘ SEE ALSO πŸ‘‘

git-blame(1), git-log(1) πŸ¦‹


⭐ GIT ⭐

Part of the git(1) suite πŸ’œ


and that's the whole page, bestie β€” slay, go find out when your files were last touched πŸ’…βœ¨

that was git-last-modified(1) from Git 2.56.0, dated 2026-09-27 β€” mwah, see you in the next manpage πŸŽ€πŸ«ΆπŸ’–

πŸ“¦ where this page comes from