Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 1.66 KB

File metadata and controls

50 lines (33 loc) · 1.66 KB

Git rb

Ruff PyPI Latest Release License image Actions status

git-rb is a simple command-line tool to simplify interactive rebase workflow in Git, often I'd find my self copying hashes from git log output in order to paste into git rebase -i. This tools only purpose is to simplify that.

Code is self contained within main.py, so you could just copy the whole script.

Note: I had this a form of this script kicking around for a while and figured I'd try using Gemini CLI to do the rest. Results were mixed, I wasn't able to 'set and forget', but it was still useful.

Usage

.gitconfig

Typically I'll have the following in .gitconfig:

[alias]
  rb = !uvx git-rb

To provide alias git rb.

Example

Running this from sklearn gives:

Screenshot of git-rb's help message

Entering '6' in the prompt just runs git rebase -i <hash on line 6>, nothing fancy!

Screenshot of git-rb in action

Simple

A simpler approach would be to just use:

git rebase -i HEAD~{{ N }}

That would mean no messing about with rich though.