https://github.com/roboloop/repo-rewriter
๐ ๏ธ A set of scripts for making targeted adjustments in Git repositories ๐๐
https://github.com/roboloop/repo-rewriter
Last synced: 2 months ago
JSON representation
๐ ๏ธ A set of scripts for making targeted adjustments in Git repositories ๐๐
- Host: GitHub
- URL: https://github.com/roboloop/repo-rewriter
- Owner: roboloop
- License: mit
- Created: 2025-09-02T11:40:46.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-11-03T22:00:46.000Z (7 months ago)
- Last Synced: 2025-11-04T00:05:33.766Z (7 months ago)
- Language: Shell
- Size: 24.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐งฌ Repo-Rewriter
> โ ๏ธ It's an educational project about GIT internals.
>
> It uses plumbing commands to achieve its goal.
`repo-rewriter` is a collection of small composable shell utilities designed to help you **explore, modify, and sign** Git repositories.
Everything is written in shell, with minimum external dependencies beyond Git itself.
## โจ Features
- **History exploration**
- `find_in_*` โ search in blobs, commits, or filepaths
- `print_authors` โ list all commit authors
- `print_files` โ show all tracked files
- **Automated rewriting**
- `drop_*` โ drop files by patterns, blobs by ids
- `replace_in_*` โ perform safe text replacements in blobs, commits, or filepaths
- `rewrite_authors` โ map and normalize author identities
- `rewrite_timestamps` โ unify all timestamps to UTC
- `sign_commits` โ cryptographically sign all commits with your GPG key
- **Interactive history rebuild**
- `rewrite_history` โ step-by-step reconstruction of a linear repository
(supports pick/commit/skip/rollback/finalize/abort flow)
- **Portable & transparent**
- POSIX-compliant shell (works on macOS and Linux)
- Self-documenting commands with `--help`
## ๐ Quick Start
```bash
# clone repository
git clone https://github.com/roboloop/repo-rewriter
cd repo-rewriter
# run any command, check docs --help
REPO_DIR="$(pwd)" ./bin/rewriter --help
REPO_DIR="$(pwd)" ./bin/rewriter print_authors --help
REPO_DIR="$(pwd)" ./bin/rewriter print_authors
````
All commands respect a single required environment variable:
| Variable | Description |
| ---------- | ------------------------------- |
| `REPO_DIR` | Path to the Git repository root |
## โ๏ธ TODO
- Installation script
- Reflog support
- Shellcheck
- Tests
## ๐งพ License
MIT ยฉ 2025 โ Crafted with โค๏ธ in pure shell.