Skip to content
All projects

GitHub Commit History Rewriter & Metadata Automator

A multi-threaded DevOps script engineered to automate the rewriting of Git commit history across bulk repositories. It dynamically manipulates commit author metadata using environment filters and force-pushes the sanitized trees concurrently.

Tech stack

Frameworks & libraries

Performance & metrics

  • Drastically reduces operation time by processing I/O-bound Git operations in parallel job queues
  • Maintains local memory safety by strictly enforcing active thread limits and purging cloned artifacts immediately post-push
  • Optimized network utilization through parameterized, quiet cloning and targeted REST API polling

Why I built it

Managing over 130 repositories means manual maintenance becomes a massive bottleneck. When I needed to migrate committer emails and author names across my entire portfolio, doing it manually repository-by-repository was entirely unscalable. I engineered this tool to interface with the GitHub REST API and parallelize the git filter-branch process, turning hours of tedious Git surgery into a rapid, automated background operation.

Architecture & decisions

The architecture utilizes PowerShell's Start-Job background runspaces to achieve concurrency with a strictly controlled thread pool (capped at 5 concurrent jobs to prevent I/O bottlenecks and local resource exhaustion). It parses the GitHub REST API to ingest repository metadata, dynamically provisions a temporary ephemeral workspace, clones the targets, and injects custom GIT_COMMITTER and GIT_AUTHOR environment variables directly into the git filter-branch execution. Finally, it executes a forced push of the mutated commit history and aggressively cleans up the local filesystem.

Key features

  1. 01Concurrent multi-threading with strict job pooling and queue management
  2. 02Automated GitHub REST API interaction for bulk repository ingestion
  3. 03Deep Git tree rewriting via aggressive git filter-branch environment injection
  4. 04Automated forced propagation of updated branches and tags to the remote origin
  5. 05Ephemeral I/O workspace management with strict post-execution cleanup routines

Technical review

This tool is a practical demonstration of aggressive, system-level infrastructure automation. Rewriting Git history (filter-branch and force-pushing) carries inherent risks; this script handles those risks with predictable, isolated thread execution and robust error handling. It highlights my ability to write no-nonsense automation that interfaces directly with underlying version control systems and cloud APIs.