2 releases (1 stable)
|2.3.0||Jul 19, 2023|
|0.1.0||Jun 12, 2022|
#21 in Text editors
84 downloads per month
Used in 4 crates
Git Interactive Rebase Tool
Native cross-platform full feature terminal based sequence editor for interactive rebase in Git 1.7.8+.
Table of Contents
Built and works on Linux, macOS, Windows and many others.
Easily set the action to
Reorder rebase list
Reorder the action list with a single key press.
Change action and reorder multiple lines at once with visual mode.
View commit details and diff
View the commit overview, and a full commit diff with a press of a key.
Unicode and Emoji support
Easily edit the command that is run by an
Edit in external editor
Need to do something in your Git editor? Quickly shell out to your editor, make a change and return to the tool.
git config --global sequence.editor interactive-rebase-tool
Standard Command Prompt and Windows Terminal
git config --global sequence.editor "'C:/path/to/interactive-rebase-tool.exe'"
GitBash requires the use of
winpty in order to work correctly, so to set the editor use:
git config --global sequence.editor "winpty /c/path/to/interactive-rebase-tool.exe"
Windows before version 10 has serious rendering issues with saturated darker colors, such as the blue color that is entirely illegible on modern displays. While it is possible to avoid using saturated colors, a better option is to update the theme using Microsoft's ColorTool.
You can temporarily use a different sequence editor by using the
GIT_SEQUENCE_EDITOR environment variable:
GIT_SEQUENCE_EDITOR=emacs git rebase -i [<upstream> [<branch>]]
interactive-rebase-tool <rebase-todo-filepath> interactive-rebase-tool --help interactive-rebase-tool --version
The tool has built-in help that can be accessed by using the
Common Default Key Bindings
Key bindings can be customized, see configuration for all key bindings and information on configuring.
|Up||Normal/Diff||Move selection up|
|Down||Normal/Diff||Move selection down|
|Page Up||Normal/Diff||Move selection up five lines|
|Page Down||Normal/Diff||Move selection down five lines|
|Home||Normal/Diff||Move selection to start of list|
|End||Normal/Diff||Move selection to home of list|
||Normal/Diff||Abort interactive rebase|
||Normal/Diff||Immediately abort interactive rebase|
||Normal/Diff||Write interactive rebase file|
||Normal/Diff||Immediately write interactive rebase file|
||Normal/Diff||Move selected commit(s) down|
||Normal/Diff||Move selected commit(s) up|
||Normal||Toggle break action|
||Normal/Diff||Set selected commit(s) to be picked|
||Normal/Diff||Set selected commit(s) to be reworded|
||Normal/Diff||Set selected commit(s) to be edited|
||Normal/Diff||Set selected commit(s) to be squashed|
||Normal/Diff||Set selected commit(s) to be fixed-up|
||Normal/Diff||Set selected commit(s) to be dropped|
||Normal||Edit the command of an editable action|
||Normal/Diff||Enter and exit visual mode|
||Normal||Insert a new line|
||Normal/Diff||Remove selected lines|
||Normal/Diff||Open todo file in external editor|
||Normal/Diff||Undo the previous change|
||Normal/Diff||Redo the previously undone change|
||Normal/Diff||Show commit information|
|Down||Diff||Scroll view down|
|Up||Diff||Scroll view up|
|Left||Diff||Scroll view left|
|Right||Diff||Scroll view right|
|Home||Diff||Scroll view to the top|
|End||Diff||Scroll view to the end|
|PageUp||Diff||Scroll view a step up|
|PageDown||Diff||Scroll view a step down|
||Diff||Show full commit diff|
Supported on all Linux based distributions. The project is tested on Debian and Ubuntu, but should work on any standard Linux distribution. If the project is not working on your platform, please open an issue.
Supported on the latest version of macOS, though previous versions should work.
Supported on the latest versions of Windows 8.1 and Windows 10 and Windows 11.
Windows Console and Git Bash are only minimally supported, and some features or graphical glitches may occur. Windows Console running in legacy mode is not supported.
Cygwin is not officially supported.
Other platforms are not officially supported. Some platforms have community support, and if you are having trouble getting the project working on your platform, please open an issue.
This project uses cargo-make as a task runner. To install:
cargo install --force cargo-make
Debian and derivatives
If you plan to build a release package you will need
liblzma-dev. They can be installed using
sudo apt install pkg-config liblzma-dev
Build and run
To build or run the project, from the project root run:
cargo make build --release cargo run -- <path-to-git-rebase-todo-file>
Sample rebase todo files can be found in ./test/fixtures.
Automated tests are available for all features and can be run with:
cargo make test
API docs for the project are generated using Rust Doc:
cargo make docs
An addition to the lints provided by rustc, this project uses Clippy to provide additional linting, run with:
cargo make lint
This will run lints using stable and nightly. The nightly lints may show errors, but will not result in a failure.
This project uses rust-fmt to provide a consistent format. A helpful script will ensure that all files are formatted correctly:
cargo make format
The project use Tarpaulin to generate coverage reports. Coverage reports are used to find gaps in tests. To generate the coverage report:
cargo make coverage
An addition to the report printed to the CLI, an HTML report can be found in the
cargo make deb
A deb file will be written to
- rebase-editor is a very similar project written in Node.js.
- cj-git-patchtool is another tool for doing git rebase en masse.
Git Interactive Rebase Tool is released under the GPLv3 license. See LICENSE.
See Third Party Licenses for licenses of the third-party libraries used by this project.
No runtime deps