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
Using regit multiple times might cause object corruption in your git repository. Please use it after backup up your .git folder.
python3 -m pip install --user git-filter-repowinget install regitgit clone https://github.com/woaitsAryan/regit && cd regitmake setupgit clone https://github.com/woaitsAryan/regit && cd regitmake setupRegit currently supports 5 commands:
regit recommit: Reads all the commit diffs and writes better commit messages, then commits them again.regit own: Makes you the author of all the commits.regit blame <name> <email>: Makes the user specified by<name>and<email>the author of all the commits.regit nuke /path/to/file: Removes the file specified from all the commits in the repository.regit retime <duration>: Rewrites the commit times of all the commits in the repository to be ofxhours in the past, evenly spaced. Can be any number of hours.regit rewind <duration>: Rewinds the commit times of all the commits to be pulledxhours in the past. Can be any number of hours.regit fastforward <duration>: Fast forwards the commit times of all the commits to be pushedxhours in the future. Can be any number of hours.
The following flags can be used with any command:
--sourceor-s: Specify the path to the git repo. If not specified, the current directory is used.--branchor-b: Specify a branch.--verboseor-v: Enable verbose output. This will print additional details about the operations being performed.--quietor-q: Enable quiet output. This will suppress most output, printing only essential information.
Regit uses 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.