'\" t
.\" Title: git-last-modified
.\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
.\" Generator: DocBook XSL Stylesheets vsnapshot
.\" Date: 2026-06-29
.\" Manual: Git Manual
.\" Source: Git 2.55.0
.\" Language: English
.\"
.TH "GIT\-LAST\-MODIFIED" "1" "2026\-06\-29" "Git 2\&.55\&.0" "Git Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
git-last-modified \- EXPERIMENTAL: Show when files were last modified
.SH "SYNOPSIS"
.sp
.nf
\fBgit\fR \fBlast\-modified\fR [\fB\-\-recursive\fR] [\fB\-\-show\-trees\fR] [\fB\-\-max\-depth=\fR\fI\fR] [\fB\-z\fR]
[\fI\fR] [[\fB\-\-\fR] \fI\fR\&...]
.fi
.sp
.SH "DESCRIPTION"
.sp
Shows which commit last modified each of the relevant files and subdirectories\&. A commit renaming a path, or changing it\(cqs mode is also taken into account\&.
.sp
THIS COMMAND IS EXPERIMENTAL\&. THE BEHAVIOR MAY CHANGE\&.
.SH "OPTIONS"
.PP
\fB\-r\fR, \fB\-\-recursive\fR
.RS 4
Recursively traverse into all subtrees\&. By default, the command only shows tree entries matching the
\fI\fR\&. With this option, it descends into subtrees and displays all entries within them\&. Equivalent to
\fB\-\-max\-depth=\-1\fR\&.
.RE
.PP
\fB\-t\fR, \fB\-\-show\-trees\fR
.RS 4
Show tree entries even when recursing into them\&.
.RE
.PP
\fB\-\-max\-depth=\fR\fI\fR
.RS 4
For each pathspec given on the command line, traverse at most
\fI\fR
levels into subtrees\&. A negative value means no limit\&. The default is 0, which shows all paths matching the pathspec without descending into subtrees\&.
.RE
.PP
\fB\-z\fR
.RS 4
Terminate each line with a
\fINUL\fR
character rather than a newline\&.
.RE
.PP
\fI\fR
.RS 4
Only traverse commits in the specified revision range\&. When no
\fI\fR
is specified, it defaults to
\fBHEAD\fR
(i\&.e\&. the whole history leading to the current commit)\&. For a complete list of ways to spell
\fI\fR, see the
\fISpecifying Ranges\fR
section of
\fBgitrevisions\fR(7)\&.
.RE
.PP
[\fB\-\-\fR] \fI\fR\&.\&.\&.
.RS 4
Show the commit that last modified each path matching
\fI\fR\&. If no
\fI\fR
is given, all files and subdirectories are included\&. See
\fBgitglossary\fR(7)
for details on pathspec syntax\&.
.RE
.SH "OUTPUT"
.sp
The output is in the format:
.sp
.if n \{\
.RS 4
.\}
.nf
TAB LF
.fi
.if n \{\
.RE
.\}
.sp
.sp
If a path contains any special characters, the path is C\-style quoted\&. To avoid quoting, pass option \fB\-z\fR to terminate each line with a NUL\&.
.sp
.if n \{\
.RS 4
.\}
.nf
TAB NUL
.fi
.if n \{\
.RE
.\}
.sp
.SH "SEE ALSO"
.sp
\fBgit-blame\fR(1), \fBgit-log\fR(1)\&.
.SH "GIT"
.sp
Part of the \fBgit\fR(1) suite