Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

35 Commits

Repository files navigation

git-shift

Synopsis

  • git-shift - shifts timestamps of commits after the fact

Requirements

  • Perl >= 5.8

  • Time::Piece >= 1.16

    Only Perl >= 5.14 comes with a reasonably new version.

How to use

 usage: git shift [options] {[<time>][{ad|cd|now}][<timediff>][<timezone>]|<datetime>} <rev-list>...
-v, --verbose be verbose
-n, --dry-run dry run
-k skip errors
<time> substitute this value for the time part(s) of
current commit time(s)
one of:
- "HH:MM:SS"
- "HH:MM" (= "HH:MM:00")
{ad|cd|now} select the base date (default: ad)
ad author date
cd commit date
now current time
<timediff> add this time span to the base date
in regexp: /^[-+]([0-9]+[wdhms])+$/
e.g.
+1d -12h 30m -1h30m -600s cd+1d
now now+1d now-1h30m
<timezone> in regexp: /^[-+][01][0-9][0-5][0-9]$/
<datetime> set this date time as commit time(s)
one of:
- ISO-8601 date time string
- date(1) format in C locale
- number of seconds since the Unix epoch
<rev-list> speficy commits to modify which must be on the
current branch; a single commit or a range of
commits: <committish1>..<committish2> denotes a
*closed* range, and <committish1>...<committish2>
denotes a *left-open* range

Author

Copyright (c) 2010-2026 Akinori MUSHA.

Licensed under the 2-clause BSD license. See LICENSE.txt for further details.

About

shifts timestamps of commits after the fact

Resources

Stars

55 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages