Bot & System Automation
Open Source

GitHub Commit History Rewriter & Metadata Automator

PowerShellShellGitHub REST APIGitPowerShell Jobs

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

PowerShellShellGitHub REST APIGitPowerShell Jobs

System 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 Did I Build This?

"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

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