https://github.com/woaitsaryan/regit
regit is a CLI tool written in Golang to rewrite Git histories
https://github.com/woaitsaryan/regit
git github
Last synced: 11 months ago
JSON representation
regit is a CLI tool written in Golang to rewrite Git histories
- Host: GitHub
- URL: https://github.com/woaitsaryan/regit
- Owner: woaitsAryan
- License: mit
- Created: 2024-01-15T14:28:40.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-23T06:32:03.000Z (over 1 year ago)
- Last Synced: 2025-03-15T14:38:01.522Z (11 months ago)
- Topics: git, github
- Language: Go
- Homepage:
- Size: 150 KB
- Stars: 4
- Watchers: 2
- Forks: 14
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Regit
CLI tool to manage git repositories and histories
Installation
·
Docs
·
Request Features
·
Report Bug
Regit is a CLI tool written in Go that allows you to rewrite git histories. Changing ownership, timestamps, even commit messages to follow conventions, all in a single command
## Warning
Using regit multiple times might cause object corruption in your git repository. Please use it after backup up your .git folder.
Installation
Windows
python3 -m pip install --user git-filter-repo
winget install regit
macOS
git clone https://github.com/woaitsAryan/regit && cd regit
make setup
Linux
git clone https://github.com/woaitsAryan/regit && cd regit
make setup
Docs
Regit currently supports 5 commands:
1. `regit recommit`: Reads all the commit diffs and writes better commit messages, then commits them again.
2. `regit own`: Makes you the author of all the commits.
3. `regit blame `: Makes the user specified by `` and `` the author of all the commits.
4. `regit nuke /path/to/file`: Removes the file specified from all the commits in the repository.
5. `regit retime `: Rewrites the commit times of all the commits in the repository to be of `x` hours in the past, evenly spaced. Can be any number of hours.
6. `regit rewind `: Rewinds the commit times of all the commits to be pulled `x` hours in the past. Can be any number of hours.
7. `regit fastforward `: Fast forwards the commit times of all the commits to be pushed `x` hours in the future. Can be any number of hours.
## Common Flags
The following flags can be used with any command:
- `--source` or `-s`: Specify the path to the git repo. If not specified, the current directory is used.
- `--branch` or `-b`: Specify a branch.
- `--verbose` or `-v`: Enable verbose output. This will print additional details about the operations being performed.
- `--quiet` or `-q`: Enable quiet output. This will suppress most output, printing only essential information.
## Credits
Regit uses [git-filter-repo](https://github.com/newren/git-filter-repo) under the hood to rewrite git histories. I would like to thank the authors and contributors of git-filter-repo for their work.