Skip to main content

license test version python downloads

git-timemachine

git-timemachine is a command-line tool that helps users record commits on Git repositories at arbitrary timestamps. It allows backdating commits with randomized timestamps while maintaining daily commit limits.

Features

  • Record commits at calculated timestamps with random time increments
  • Shift commit time forward or backward by days/hours
  • Review commit history grouped by date
  • Enforce daily commit limits to prevent abuse
  • Automatic version checking from PyPI
  • Configurable settings via YAML files

Installation

Via pip (Recommended)

pip install --user --upgrade git-timemachine

Via Binary Release

Download the latest release from GitHub Releases and ensure the git-timemachine command is in your $PATH environment variable.

Quick Start

Record a Commit

git-timemachine commit -m "Your commit message"

The commit will be recorded at a calculated timestamp based on your last commit time plus a random increment (between 600-3600 seconds by default).

Shift Commit Time

# Shift forward by 3 days
git-timemachine shift --days 3

# Shift backward by 2 hours
git-timemachine shift --hours -2

# Set timestamp directly
git-timemachine shift --at "2024-06-15T10:30:00"

# Show current timestamp
git-timemachine shift --show

Review Commit History

git-timemachine review

Displays a table showing commit counts grouped by date:

+------------+---------+
|    date    | commits |
+------------+---------+
| 2025-01-15 |    3    |
| 2025-01-16 |    5    |
| 2025-01-17 |    2    |
+------------+---------+

Configuration

Configuration files are stored in ~/.git-timemachine/ by default.

Config File (~/.git-timemachine/config)

Setting Default Description
max_daily_commits 5 Maximum commits per day
jitter_min 600 Minimum time increment (sec)
jitter_max 3600 Maximum time increment (sec)
update_check_interval 1 Days between version checks

States File (~/.git-timemachine/states)

State Description
last_commit_time Timestamp of last commit
last_update_check Timestamp of last version check

Environment Variables

Variable Description
GIT_TIMEMACHINE_CONFIG Custom config file path
GIT_TIMEMACHINE_STATES Custom states file path

CLI Reference

git-timemachine [OPTIONS] COMMAND [ARGS]...

Commands:
  commit  Record a commit at specified time node
  shift   Adjust the persisted timestamp forward or backward
  review  Review commit history grouped by date

Global Options:
  -C, --repo-dir PATH  Repository directory (default: current directory)
  --version            Show version

commit

git-timemachine commit [OPTIONS] [ARGS]

Options:
  -m, --message TEXT    Commit message (mutually exclusive with --file)
  -F, --file PATH       Read commit message from file (mutually exclusive with
                        --message)
  --jitter-min INTEGER  Minimum time jitter in seconds (overrides config)
  --jitter-max INTEGER  Maximum time jitter in seconds (overrides config)

Arguments:
  ARGS  Extra arguments passed to git commit

Note: Either --message or --file is required. They are mutually exclusive.

The --jitter-min and --jitter-max options override the config file settings for the current commit only.

shift

git-timemachine shift [OPTIONS]

Options:
  -d, --days FLOAT    Shift by N days (positive=forward, negative=backward)
  -h, --hours FLOAT   Shift by N hours (positive=forward, negative=backward)
  -a, --at TEXT       Directly overwrite timestamp with ISO datetime string
  -s, --show          Display current timestamp without modifying

Note: At least one of --days, --hours, --at, or --show is required.

review

git-timemachine review

Development

Setup

# Clone the repository
git clone https://github.com/garrett-he/git-timemachine.git
cd git-timemachine

# Install dependencies
just init

Common Commands

just lint          # Run ruff
just test          # Run tests with coverage
just build         # Build package

Documentation

  • Architecture - System architecture and design
  • Design - Design decisions and implementation details

Requirements

  • Python 3.12 - 3.14
  • Git (command-line tool)

License

Copyright (C) 2025 Garrett HE garrett.he@hotmail.com

The MIT License, see LICENSE.

Metadata

Release files for git-timemachine 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-timemachine 3.1.0
File Size Uploaded Provenance Actions
git_timemachine-3.1.0.tar.gz 176.6 kB Without provenance Details for git_timemachine-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for git-timemachine 3.1.0
File Interpreter ABI Platform Actions
git_timemachine-3.1.0-py3-none-any.whl Python 3 none any Details for git_timemachine-3.1.0-py3-none-any.whl

Total release size: 190.9 kB

Release files / git_timemachine-3.1.0.tar.gz

Download URL git_timemachine-3.1.0.tar.gz
Size 176.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3265b0731173496eac9e21be198e899aaecf4755f2b51400eccaa3bdbba8c6cc
BLAKE2b-256 checksum
How to use checksums
50cc0f7107f90b9f6f81fa7e75632270b7ce0663160c7011e3a76550bbc26837
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / git_timemachine-3.1.0-py3-none-any.whl

Download URL git_timemachine-3.1.0-py3-none-any.whl
Size 14.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c1b825f121b674f3fc30e839ad6564bde71a983fc3b2b85569f5ece4f1fd123b
BLAKE2b-256 checksum
How to use checksums
db7b6d3060b2b209a53afb1d475dff9ceb8e511a17df287e5fc4d5fd20ce1760
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for git-timemachine 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page