npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

commit-date-changer

v1.1.0

Published

Interactive CLI tool to safely change Git commit dates

Readme

commit-date-changer

npm version npm downloads

An interactive CLI tool for safely changing Git commit dates with built-in validation and multi-language support.

Features

  • Safe by default - Works with unpushed commits by default
  • Two modes - Interactive UI or CLI mode for automation
  • Safety warnings - Multiple protection layers when working with pushed commits
  • Smart validation - Automatic chronological order checking
  • Interactive UI - User-friendly interface with colored output
  • Multilingual - Support for English and Russian
  • Batch processing - Change multiple commits in one session
  • ISO format - Simple and unambiguous date format (YYYY-MM-DDTHH:mm)
  • JSON output - Structured output for automation and scripting

Installation

npm install -g commit-date-changer

Or locally in your project:

npm install --save-dev commit-date-changer

Usage

Interactive Mode (Default)

Simply run the command and follow the prompts:

commit-date

The tool will:

  1. Show you a list of commits (unpushed only by default)
  2. Let you select a commit to modify
  3. Show the current date and valid date range
  4. Ask for a new date with validation
  5. Preview changes before applying
  6. Allow you to modify more commits in the same session

Options for interactive mode:

commit-date --count 20              # Show more commits (default: 10)
commit-date --allow-pushed          # Include pushed commits (⚠️ dangerous)
commit-date --lang ru               # Set russian language

CLI Mode (For Automation)

Change commit dates directly from the command line:

# Basic usage
commit-date --hash abc1234 --date "2025-10-28T18:30"

# With JSON output for scripts
commit-date --hash abc1234 --date "2025-10-28T18:30" --json

# Modify pushed commit and skip confirmation
commit-date --hash abc1234 --date "2025-10-28T18:30" --allow-pushed --no-confirm

CLI flags:

  • --hash <hash> - Short or full commit hash
  • --date <iso-date> - New date in ISO 8601 format (YYYY-MM-DDTHH:mm or full ISO string)
  • --allow-pushed - Allow working with pushed commits (⚠️ dangerous)
  • --no-confirm - Skip confirmations for pushed commits
  • --json - Output result in JSON format
  • --lang <language> - Set language: en (English) or ru (Русский)
  • -l <language> - Short form for --lang

JSON output example:

{
  "success": true,
  "commit": {
    "hash": "abc1234",
    "message": "Add user authentication",
    "oldDate": "2024-01-01T10:30:00",
    "newDate": "2024-01-01T08:00:00"
  }
}

Other Options

commit-date --help                  # Show help
commit-date --version               # Show version

Example: Interactive Mode

🔍 Found 3 commits

  1. a1b2c3d (2024-01-01 10:30) Add user authentication
  2. d4e5f6g (2024-01-01 14:20) Fix login bug
  3. g7h8i9j (2024-01-02 09:15) Update README

? Select commit to change date: 1

✓ Selected commit: a1b2c3d

📅 Current date: 2024-01-01T10:30:00
   Valid range: no limit — 2024-01-01T14:19:59

? Enter new date and time (ISO format: YYYY-MM-DDTHH:mm): 2024-01-01T08:00

✓ New date: 2024-01-01T08:00:00

📋 Preview of changes:
   Commit:       a1b2c3d "Add user authentication"
   Old date:     2024-01-01T10:30:00
   New date:     2024-01-01T08:00:00
   Changing:     Author Date + Committer Date

? Apply changes? (Y/n) y

✨ Commit date successfully changed!

? Change another commit? (y/N) n

👋 Done!

Example: CLI Mode

# Change a local commit
$ commit-date --hash a1b2c3d --date "2024-01-01T08:00"
✨ Commit date successfully changed!

# Get JSON output
$ commit-date --hash a1b2c3d --date "2024-01-01T08:00" --json
{"success":true,"commit":{"hash":"a1b2c3d","message":"Add user authentication","oldDate":"2024-01-01T10:30:00","newDate":"2024-01-01T08:00:00"}}

# Change pushed commit (dangerous!)
$ commit-date --hash d4e5f6g --date "2024-01-01T15:00" --allow-pushed --no-confirm
✨ Commit date successfully changed!
⚠️  This commit was pushed. You need to force push: git push --force-with-lease

Requirements

  • Node.js >= 18.0.0
  • Git repository
  • Clean working tree (no uncommitted changes)

Safety

Safe Mode (Default)

By default, the tool:

  • Works only with unpushed commits
  • Doesn't require force push
  • Is safe for team collaboration

--allow-pushed Mode (⚠️ Dangerous!)

Use only if:

  • ✅ You're working in a personal branch
  • ✅ Nobody else is using this branch
  • ✅ You understand the consequences of force push

Modifying pushed commits:

  • ⚠️ Rewrites Git history
  • ⚠️ Requires git push --force-with-lease
  • ⚠️ Can break other developers' work

The tool will show multiple warnings and ask for confirmation before proceeding!

Development

# Install dependencies
npm install

# Development mode
npm run dev

# Build
npm run build

# Run tests
npm test

# Format code
npm run format

License

MIT

Author

Timur Arbaev