git-utimes(1)

git-utimes1

Change files modification time to their last commit date

Usage

git-utimes [--newer]

Overview

Change files modification time to their last commit date. Does not touch files that are in the working tree or index.

Options

--newer

Preserves the original modification time of files that were committed from the local repo, by only touching files that are newer than their last commit date.

Examples

Update all files' modification time to their last commit date, except those in working tree or index:

$ git utimes

As above, but preserve original modification time of files that were committed from local repo:

$ git utimes --newer

Releases

2 releases since Debian 12 (Bookworm); the text changed 1 time.

  1. 12
  2. 13

Author

Written by Vitaly Chikunov <[email protected]>, inspired by Stackexchange comments. Updated by Bill Wood <[email protected]> to add --newer flag and ignore files in the working tree or index.

Reporting bugs

<https://github.com/tj/git-extras/issues>

From git-extras 7.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.