GIT-UTIMES(1)

πŸ’… git-utimes(1) β€” the Git Extras glow-up for your mtimes

okay bestie, so you know how git files be sitting there with modification times that make zero sense? like they got touched at 3am on a Tuesday for no reason? yeah. this is the fix. it's git-utimes, it lives in Git Extras, and it's lowkey iconic. πŸ¦‹


✨ NAME ✨

git-utimes β€” change files modification time to their last commit date πŸ•°οΈπŸ’–

literally what it says on the tin. no cap.


🌸 SYNOPSIS 🌸

git-utimes [--newer]

that's it. that's the whole vibe. one optional flag, zero drama. πŸŽ€


🧚 DESCRIPTION 🧚

so here's the tea: git-utimes goes through your files and sets each one's modification time to the date of its last commit. your filesystem timestamps finally match reality. slay. ✨

and the super important part β€” the way that it's not out here messing with everything β€” it does not touch files that are in the working tree or index. nope. those get left all the way alone. πŸ™ˆ

so if you've got uncommitted edits flopping around in your working tree or staged in the index, chill, this command is not coming for them. 🫢

πŸ’… OPTIONS πŸ’…

  • --newer β€” this one preserves the original modification time of files that were committed from the local repo. how? by only touching files that are newer than their last commit date. it's giving "respectful." it's giving "boundaries." we love her. πŸ‘‘

πŸ”₯ EXAMPLES πŸ”₯

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

$ git utimes

the classic. the standard. the main character move. πŸ’–

2. same as above, but preserve the original modification time of files that were committed from the local repo:

$ git utimes --newer

same energy, but with the --newer flag doing its little protective thing ✨


πŸ‘‘ AUTHOR πŸ‘‘

written by Vitaly Chikunov <vt@altlinux.org>, inspired by Stackexchange comments. (iykyk 😭)

updated by Bill Wood <wpwoodjr@gmail.com> to add the --newer flag and ignore files in the working tree or index. 🫢


πŸ› REPORTING BUGS πŸ›

found a bug? bestie, tell the people:

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


🌈 SEE ALSO 🌈

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


and that's the whole page, periodt. πŸ’œ this gem of a manpage is straight out of Git Extras, dated May 2026, and filed under GIT-UTIMES(1) β€” go forth and fix those timestamps, you absolute icon. πŸŽ€βœ¨

πŸ“¦ where this page comes from