git rebase --interactive
(or git rebase -i
) is a great command. The Swiss army knife in git.
Many of us are using it daily,
I will explain how to make its usage easier.
Note: if you're not familiar with it. You can look at the bottom of my article where I give you resources to discover it.
When dealing with git interactive rebase, git
opens your $EDITOR
by default, so your editor is opened with a text file where you can reorder the line to reorder the commits, replace pick
by fixup
, squash
, drop
…. It's convenient, but there is a tool to make things easier.
MitMaro
/
git-interactive-rebase-tool
Native cross-platform full feature terminal-based sequence editor for git interactive rebase.
Git Interactive Rebase Tool
Native cross-platform full feature terminal based sequence editor for interactive rebase in Git 1.7.8+.
This is the documentation for the development build. For the current stable release, please use the 2.3.x documentation.
Table of Contents
Features
Cross-platform
Built and works on Linux, macOS, Windows, and many others.
Set action
Easily set the action to pick
, squash
, fixup
, edit
, reword
and drop
.
Reorder rebase list
Reorder the action list with a single key press.
Multiline modification
Change action and reorder multiple lines at once with visual mode.
Toggle break
s
View commit details and diff
View the commit overview, and a full commit diff with a press of a key.
Unicode and Emoji support
Edit exec
command
Easily edit the command that is run by an exec
command.
Edit in external editor
…It relies on the ability to define a specific editor for git
rebase --interactive
This tool is amazing! It changed my life. Here is what it looks like and allows:
Choose the action by pressing a single key
There are others features you will discover by reading the documentation.
The maintainers are currently working on a new version, so I recommend you using the last stable version, here is the documentation
https://github.com/MitMaro/git-interactive-rebase-tool/blob/2.3.0/README.md
about git rebase interactive
If you want to discover git rebase interactive, you can read these posts:
![rlxdprogrammer](https://res.cloudinary.com/practicaldev/image/fetch/s--JKujIm2z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://media.dev.to/cdn-cgi/image/width%3D150%2Cheight%3D150%2Cfit%3Dcover%2Cgravity%3Dauto%2Cformat%3Dauto/https%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Fuser%252Fprofile_image%252F98911%252Ff7073e2f-85cd-42b1-b3b5-6f8d1bb4c932.jpg)
Advanced GIT tutorial - Interactive rebase
Marcell Lipp ・ Mar 12 '20
![schalkneethling](https://res.cloudinary.com/practicaldev/image/fetch/s--7LBC9mJW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://media.dev.to/cdn-cgi/image/width%3D150%2Cheight%3D150%2Cfit%3Dcover%2Cgravity%3Dauto%2Cformat%3Dauto/https%253A%252F%252Fdev-to-uploads.s3.amazonaws.com%252Fuploads%252Fuser%252Fprofile_image%252F94588%252F013d6c41-33f4-48bc-a21c-d043d4858c85.jpeg)
How do you use git rebase? Let's go through one use case
Schalk Neethling ・ Apr 23
This last post made by @schalkneethling inspired me to talk about this tool that changed my life.
Image credits: Tim Oram (@mitmaro) on GitHub and dev.to the git-interactive-rebase-tool
maintainer.
Top comments (1)
Thank you for sharing this and the shoutout!