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

urmama

v3.0.0

Published

Rewrite the full commit history of a Git branch so that all commits fall within a specified date range.

Readme

urmama

   _   _ ____  __  __    _    __  __    _   
  | | | |  _ \|  \/  |  / \  |  \/  |  / \  
  | | | | |_) | |\/| | / _ \ | |\/| | / _ \ 
  | |_| |  _ <| |  | |/ ___ \| |  | |/ ___ \
   \___/|_| \_\_|  |_/_/   \_\_|  |_/_/   \_\

urmama is a Node.js CLI tool for rewriting the full commit history of a Git branch so that every commit falls within a chosen date window while preserving the original order of commits.

For detailed information on options, modes, branch handling, and automation, see the urmama CLI Documentation.

It is especially useful for re-timing a branch for a hackathon, project sprint, or other date-based workflow without changing the commit contents themselves.

urmama demo

Features

  • Rewrites an entire branch history from the root commit to HEAD
  • Preserves commit order and message content
  • Supports three distribution strategies:
    • randomise (default)
    • equalize
    • greedyMum
  • Writes to a new branch by default, or rewrites the target branch in place when requested
  • Optionally force-pushes the rewritten branch to a remote
  • Enforces safety checks such as valid date range, existing target branch, and clean working tree

Installation

Install globally with npm:

npm install -g urmama

Usage

urmama \
  --starts "YYYY-MM-DD HH:mm" \
  --ends "YYYY-MM-DD HH:mm" \
  [options]

Required arguments

  • --starts: start datetime (inclusive)
  • --ends: end datetime (inclusive)

Optional arguments

  • --targetBranch : branch to rewrite; defaults to the current active branch
  • --destBranch : branch that will receive the rewritten history
  • --useTargetAsDest [true|false]: rewrite the target branch in place instead of creating a copy
  • --mode : distribution strategy; one of randomise, equalize, greedyMum
  • --forcePushTo : force-push the rewritten branch after completion
  • --help, -h: show usage information

Distribution modes

randomise (default)

Distributes commits randomly across the available days while keeping their original relative order.

equalize

Spreads commits as evenly as possible across the date range.

greedyMum

Preserves commits already inside the requested range and only adjusts commits that fall outside it. This mode is deterministic and is designed to avoid moving commits unnecessarily.

Examples

1. Create a rewritten copy of the current branch

urmama \
  --starts "2026-06-01 09:00" \
  --ends "2026-06-04 18:00"

This creates a new branch named like currentBranch-Copy.

2. Rewrite the main branch in place

urmama \
  --starts "2026-06-01 09:00" \
  --ends "2026-06-04 18:00" \
  --targetBranch "main" \
  --useTargetAsDest true

3. Backup, rewrite, and force-push

urmama \
  --starts "2026-06-01 09:00" \
  --ends "2026-06-04 18:00" \
  --targetBranch "main" \
  --destBranch "main-backup" \
  --useTargetAsDest true \
  --forcePushTo "origin"

Safety and requirements

Before rewriting history, urmama checks that:

  • you are inside a Git repository
  • the target branch exists
  • the working tree has no uncommitted changes
  • --starts occurs before --ends

Because this tool rewrites history, it is safest to use it on a backup branch or a disposable branch first. When --useTargetAsDest is enabled, the tool will warn you before rewriting the target branch in place.

Development

Run the test suite:

npm test

Notes

This project uses Git’s native CLI to rebuild commit history and updates both the author and committer dates for rewritten commits.