{"id":13503088,"url":"https://github.com/MitMaro/git-interactive-rebase-tool","last_synced_at":"2025-03-29T13:30:43.701Z","repository":{"id":14813148,"uuid":"77011446","full_name":"MitMaro/git-interactive-rebase-tool","owner":"MitMaro","description":"Native cross-platform full feature terminal-based sequence editor for git interactive rebase.","archived":false,"fork":false,"pushed_at":"2025-03-14T17:05:23.000Z","size":10852,"stargazers_count":1619,"open_issues_count":19,"forks_count":50,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-25T18:13:31.570Z","etag":null,"topics":["cross-platform","editor","git","hacktoberfest","rust"],"latest_commit_sha":null,"homepage":"https://gitrebasetool.mitmaro.ca/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MitMaro.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["mitmaro"]}},"created_at":"2016-12-21T03:13:07.000Z","updated_at":"2025-03-20T01:36:08.000Z","dependencies_parsed_at":"2023-02-19T05:31:33.295Z","dependency_job_id":"c4b04cfc-0619-42ba-8228-6e0158a9af63","html_url":"https://github.com/MitMaro/git-interactive-rebase-tool","commit_stats":{"total_commits":890,"total_committers":26,"mean_commits":34.23076923076923,"dds":"0.18089887640449442","last_synced_commit":"bdf2f38066bc394584bc977f8ac1ad9d66aa1130"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MitMaro%2Fgit-interactive-rebase-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MitMaro%2Fgit-interactive-rebase-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MitMaro%2Fgit-interactive-rebase-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MitMaro%2Fgit-interactive-rebase-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MitMaro","download_url":"https://codeload.github.com/MitMaro/git-interactive-rebase-tool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246190198,"owners_count":20737989,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross-platform","editor","git","hacktoberfest","rust"],"created_at":"2024-07-31T22:02:36.560Z","updated_at":"2025-03-29T13:30:43.093Z","avatar_url":"https://github.com/MitMaro.png","language":"Rust","funding_links":["https://github.com/sponsors/mitmaro"],"categories":["Rust","Applications","rust"],"sub_categories":["Development","👨‍💻 Development (9)"],"readme":"[![Crates.io](https://img.shields.io/crates/v/git-interactive-rebase-tool.svg)][crates-io]\n[![Packaging status](https://repology.org/badge/tiny-repos/git-interactive-rebase-tool.svg)](https://repology.org/project/git-interactive-rebase-tool/versions)\n[![GitHub license](https://img.shields.io/badge/license-GPL-blue.svg)][license]\n[![Coverage Status](https://coveralls.io/repos/github/MitMaro/git-interactive-rebase-tool/badge.svg?branch=master)](https://coveralls.io/github/MitMaro/git-interactive-rebase-tool?branch=master)\n\n# Git Interactive Rebase Tool\n\nNative cross-platform full-featured terminal-based [sequence editor][git-sequence-editor] for interactive rebase in Git 1.7.8+.\n\n[![Git Interactive Rebase Tool](/docs/assets/images/girt-demo.gif?raw=true)](https://youtu.be/q3tzb-gQC0w)\n\n## Table of Contents\n\n* [Features](#features)\n* [Install](./readme/install.md)\n* [Setup](#setup)\n* [Usage](#direct-usage)\n* [Customization](./readme/customization.md)\n* [Development](#development)\n* [Related Projects](#related-projects)\n* [License](#license)\n\n## Features\n\n### Cross-platform\n\nBuilt and works on Linux, macOS, Windows, and many others.\n\n### Set action\n\nEasily set the action to `pick`, `squash`, `fixup`, `edit`, `reword` and `drop`.\n\n![Basic operations](/docs/assets/images/girt-set-actions.gif?raw=true)\n\n### Reorder rebase list\n\nReorder the action list with a single key press.\n\n![Reorder items](/docs/assets/images/girt-reorder.gif?raw=true)\n\n### Multiline modification\n\nChange action and reorder multiple lines at once with visual mode.\n\n![Visual mode](/docs/assets/images/girt-visual-mode.gif?raw=true)\n\n### Toggle `break`s\n\n![Toggle breaks](/docs/assets/images/girt-break.gif?raw=true)\n\n### View commit details and diff\n\nView the commit overview, and a full commit diff with a press of a key.\n\n![Commit overview](/docs/assets/images/girt-commit-overview.gif?raw=true)\n\n![Commit diff](/docs/assets/images/girt-commit-diff.gif?raw=true)\n\n### Unicode and Emoji support\n\n![Unicode support](/docs/assets/images/girt-unicode.png?raw=true)\n\n![Emoji support](/docs/assets/images/girt-emoji.png?raw=true)\n\n### Edit `exec` command\n\nEasily edit the command that is run by an `exec` command.\n\n![exec action command edit](/docs/assets/images/girt-edit.gif?raw=true)\n\n### Edit in external editor\n\nNeed to do something in your Git editor? Quickly shell out to your editor, make a change and return to the tool.\n\n![Shell out to editor](/docs/assets/images/girt-external-editor.gif?raw=true)\n\n### Advanced Features\n\n#### Modified line exec command\n\nThis optional feature allows for the injection of an `exec` action after modified lines, where modified is determined as a changed action, command, or reference. This can be used to amend commits to update references in the commit message or run a test suite only on modified commits.\n\nTo enable this option, set the `interactive-rebase-tool.postModifiedLineExecCommand` option, providing an executable or script.\n\n```shell\ngit config --global interactive-rebase-tool.postModifiedLineExecCommand \"/path/to/global/script\"\n```\n\nOr using repository-specific configuration, for targeted scripts.\n\n```shell\ngit config --global interactive-rebase-tool.postModifiedLineExecCommand \"/path/to/repo/script\"\n```\n\nThe first argument provided to the script will always be the action performed. Then, depending on the action, the script will be provided a different set of arguments.\n\nFor `drop`, `fixup`, `edit`, `pick`, `reword` and `squash` actions, the script will additionally receive the original commit hash, for `exec` the original and new commands are provided, and for `label`, `reset`, `merge`, and `update-ref` the original label/reference and new label/reference are provided.\n\nFull example of a resulting rebase todo file, assuming that `interactive-rebase-tool.postModifiedLineExecCommand` was set to `script.sh`.\n\n```\n# original line: label onto\nlabel new-onto\nexec script.sh \"label\" \"onto\" \"new-onto\"\n\n# original line: reset onto\nreset new-onto\nexec script.sh \"reset\" \"onto\" \"new-onto\"\n\npick   a12345 My feature\n# original line: pick b12345 My change\nsquash b12345 My change\nexec script.sh \"squash\" \"b12345\"\n\n# original line: label branch\nlabel branch\nexec script.sh \"label\" \"branch\" \"new-branch\"\n\n# original line: exec command\nexec new-command\nexec script.sh \"exec\" \"command\" \"new-command\"\n```\n\n## Setup\n\n### Most systems\n\n```shell\ngit config --global sequence.editor interactive-rebase-tool\n```\n\n### Windows\n\n#### Standard Command Prompt and Windows Terminal\n\n```shell\ngit config --global sequence.editor \"'C:/path/to/interactive-rebase-tool.exe'\"\n```\n\n#### Git Bash\n\nGit Bash requires the use of `winpty` in order to work correctly, so to set the editor use:\n\n```shell\ngit config --global sequence.editor \"winpty /c/path/to/interactive-rebase-tool.exe\"\n```\n\n#### Notes\n\nWindows before version 10 has [serious rendering issues with saturated darker colors](https://devblogs.microsoft.com/commandline/updating-the-windows-console-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](https://github.com/Microsoft/Terminal/tree/master/src/tools/ColorTool).\n\n### Temporary Override\n\nYou can temporarily use a different sequence editor by using the `GIT_SEQUENCE_EDITOR` environment variable:\n\n```shell\nGIT_SEQUENCE_EDITOR=emacs git rebase -i [\u003cupstream\u003e [\u003cbranch\u003e]]\n```\n\n## Direct Usage\n\n```shell\ninteractive-rebase-tool \u003crebase-todo-filepath\u003e\ninteractive-rebase-tool --help\ninteractive-rebase-tool --version\n```\n\n### Getting Help\n\nThe tool has built-in help that can be accessed by using the `?` key.\n\n### Common Default Key Bindings\n\nKey bindings can be customized, see [configuration](readme/customization.md#key-bindings) for all key bindings and information on configuring.\n\n| Key         | Mode        | Description                               |\n|-------------|-------------|-------------------------------------------|\n| `?`         | All         | Show help                                 |\n| Up          | Normal/Diff | Move selection up                         |\n| Down        | Normal/Diff | Move selection down                       |\n| Page Up     | Normal/Diff | Move selection up five lines              |\n| Page Down   | Normal/Diff | Move selection down five lines            |\n| Home        | Normal/Diff | Move selection to start of list           |\n| End         | Normal/Diff | Move selection to home of list            |\n| `q`         | Normal/Diff | Abort interactive rebase                  |\n| `Q`         | Normal/Diff | Immediately abort interactive rebase      |\n| `w`         | Normal/Diff | Write interactive rebase file             |\n| `W`         | Normal/Diff | Immediately write interactive rebase file |\n| `j`         | Normal/Diff | Move selected commit(s) down              |\n| `k`         | Normal/Diff | Move selected commit(s) up                |\n| `b`         | Normal      | Toggle break action                       |\n| `p`         | Normal/Diff | Set selected commit(s) to be picked       |\n| `r`         | Normal/Diff | Set selected commit(s) to be reworded     |\n| `e`         | Normal/Diff | Set selected commit(s) to be edited       |\n| `s`         | Normal/Diff | Set selected commit(s) to be squashed     |\n| `f`         | Normal/Diff | Set selected commit(s) to be fixed-up     |\n| `d`         | Normal      | Set selected commit(s) to be dropped      |\n| `d`         | Diff        | Show full commit diff                     |\n| `E`         | Normal      | Edit the command of an editable action    |\n| `v`         | Normal/Diff | Enter and exit visual mode (for selection)|\n| `I`         | Normal      | Insert a new line                         |\n| `Delete`    | Normal/Diff | Remove selected lines                     |\n| `!`         | Normal/Diff | Open todo file in external editor         |\n| `Control+z` | Normal/Diff | Undo the previous change                  |\n| `Control+y` | Normal/Diff | Redo the previously undone change         |\n| `c`         | Normal/Diff | Show commit information                   |\n| Down        | Diff        | Scroll view down                          |\n| Up          | Diff        | Scroll view up                            |\n| Left        | Diff        | Scroll view left                          |\n| Right       | Diff        | Scroll view right                         |\n| Home        | Diff        | Scroll view to the top                    |\n| End         | Diff        | Scroll view to the end                    |\n| PageUp      | Diff        | Scroll view a step up                     |\n| PageDown    | Diff        | Scroll view a step down                   |\n\n## Supported Platforms\n\n### Linux\n\nSupported 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](https://github.com/MitMaro/git-interactive-rebase-tool/issues/new).\n\nThe tool is tested in [Tilix](https://gnunn1.github.io/tilix-web/) and [Gnome Terminal](https://help.gnome.org/users/gnome-terminal/stable/).\n\n### macOS\n\nSupported on the latest version of macOS, though previous versions should work.\n\nThe tool is tested in [iTerm2](https://www.iterm2.com/) and [Terminal](https://support.apple.com/en-ca/guide/terminal/welcome/mac).\n\n### Windows\n\nSupported on the latest versions of Windows 10 and Windows 11.\n\nThe tool is tested on Windows 11 in [PowerShell](https://docs.microsoft.com/powershell/) and Command Prompt inside [Windows Console](https://docs.microsoft.com/windows/console/) and [Windows Terminal](https://docs.microsoft.com/windows/terminal/). The latest version of Git Bash provided from [Git for Windows](https://gitforwindows.org/) is also supported.\n\nWindows Console and Git Bash are only minimally supported, and some features or graphical glitches may occur. Windows Console running in [legacy mode](https://docs.microsoft.com/windows/console/legacymode) is not supported.\n\n[Cygwin](https://www.cygwin.com/) is not officially supported.\n\n### Others\n\nOther 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](https://github.com/MitMaro/git-interactive-rebase-tool/issues/new).\n\n## Development\n\n### Install Rust\n\nTo start developing the project, you will need to [install Rust][install-rust], which can generally be done using [rustup].\n\n### Setup\n\n#### Cargo Make\n\nThis project uses [cargo-make](https://github.com/sagiegurari/cargo-make) as a task runner. To install:\n\n```shell\ncargo install --force cargo-make\n```\n\n#### Debian and derivatives\n\nIf you plan to build a release package you will need `pkg-config` and `liblzma-dev`. They can be installed using `apt`:\n\n```shell\nsudo apt install pkg-config liblzma-dev\n```\n\n### Build and run\n\nTo build or run the project, from the project root run:\n\n```shell\n# only build\ncargo make build --release\n# build and run\ncargo run -- \u003cpath-to-git-rebase-todo-file\u003e\n```\n\nSample rebase todo files can be found in ./test/fixtures.\n\n### Tests\n\nAutomated tests are available for all features and can be run with:\n\n```shell\ncargo make test\n```\n\n### Docs\n\nAPI docs for the project are generated using Rust Doc:\n\n```shell\ncargo make docs\n```\n\n### Linting\n\nAn addition to the lints provided by `rustc`, this project uses `Clippy` to provide additional linting, run with:\n\n```shell\ncargo make lint\n```\n\nThis will run lints using stable and nightly. The nightly lints may show errors, but will not result in a failure.\n\n### Format\n\nThis project uses `rust-fmt` to provide a consistent format. A helpful script will ensure that all files are formatted correctly:\n\n```shell\ncargo make format\n```\n\n### Coverage\n\nThe project use [Tarpaulin](https://github.com/xd009642/tarpaulin) to generate coverage reports. Coverage reports are used to find gaps in tests. To generate the coverage report:\n\n```shell\ncargo make coverage\n```\n\nAn addition to the report printed to the CLI, an HTML report can be found in the `coverage` directory.\n\n### Release\n\n#### Debian Packaging Building\n\n```shell\ncargo make build-deb\n```\n\nA deb file will be written to `target/debian/git-interactive-rebase-tool_*.deb`.\n\n#### RPM Building\n\n```shell\ncargo make build-rpm\n```\n\nA rpm file will be written to `target/generate-rpm/git-interactive-rebase-tool-*.deb`.\n\n#### Reproducible Builds\n\nProviding a [`SOURCE_DATE_EPOCH`](https://reproducible-builds.org/specs/source-date-epoch/#idm55) environment variable with a valid Unix timestamp, defined in seconds, will ensure a reproducible build.\n\n## Related Projects\n\n* [rebase-editor](https://github.com/sjurba/rebase-editor) is a very similar project written in Node.js.\n* [cj-git-patchtool](https://github.com/pflanze/cj-git-patchtool) is another tool for doing `git rebase` en masse.\n* [andrewshadura/git-crecord](https://github.com/andrewshadura/git-crecord) provides interactive selection of changes to a commit.\n\n## License\n\nCopyright © 2017-2024 Tim Oram and Contributors\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nA copy of the GNU General Public License can be found in the file\n[COPYING](COPYING).\n\nSee [Third Party Licenses](https://gitrebasetool.mitmaro.ca/licenses.html) for licenses of the third-party libraries used by this project.\n\n[appveyor-build]:https://ci.appveyor.com/project/MitMaro/git-interactive-rebase-tool/branch/master\n[cargo]:https://github.com/rust-lang/cargo\n[crates-io]:https://crates.io/crates/git-interactive-rebase-tool\n[git-sequence-editor]:https://git-scm.com/docs/git-config#git-config-sequenceeditor\n[install-rust]:https://doc.rust-lang.org/book/getting-started.html\n[license]:https://raw.githubusercontent.com/MitMaro/git-interactive-rebase-tool/master/LICENSE\n[releases]:https://github.com/MitMaro/git-interactive-rebase-tool/releases\n[rustup]:https://www.rustup.rs/\n[travis-build]:https://travis-ci.org/MitMaro/git-interactive-rebase-tool\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMitMaro%2Fgit-interactive-rebase-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMitMaro%2Fgit-interactive-rebase-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMitMaro%2Fgit-interactive-rebase-tool/lists"}