Show HN: I made a git rebase TUI editor

NyuB | 115 points

I found this code interesting (not sarcasm) in demo/boiling.ml:

  let increase_level t =
    let level =
      match t.level with
      | No_Fire -> One_Fire
      | One_Fire -> Two_Fires
      | Two_Fires -> Three_Fires
      | Three_Fires -> Three_Fires
    in
    { t with level }
  ;;

  let decrease_level t =
    let level =
      match t.level with
      | No_Fire -> No_Fire
      | One_Fire -> No_Fire
      | Two_Fires -> One_Fire
      | Three_Fires -> Two_Fires
    in
    { t with level }
  ;;
hu3 | 2 months ago

Went to repository expecting a Git rebase editor and found a whole world of confusion.

Not sure what this project is now, it certainly does not seems to be a TUI focused on Git rebases.

oniony | 2 months ago

I’ve been using rebase-editor for years and am pretty happy with it. Maybe it could be an inspiration for you?

Congrats for the release!

https://github.com/sjurba/rebase-editor

nesk_ | 2 months ago

git-interactive-rebase-tool (https://github.com/MitMaro/git-interactive-rebase-tool) has been my go-to for many years now.

It is configured using `git config --global sequence.editor interactive-rebase-tool`. See if you are able to use that interface as well. That will make it easy to use without breaking existing workflows that use `git rebase -i`.

I will give it a try anyway.

DarmokJalad1701 | 2 months ago

I wish there were a good TUI for handling merge conflicts. Vimdiff seems to be the closest, but doesn't have keyboard bindings for 3-way merges.

Nothing beats Meld for me, but if you're on a remote GUI-less machine, there aren't good options.

lostdog | 2 months ago

how is your tea different from https://opam.ocaml.org/packages/teash/?

mro_name | 2 months ago

Thanks for the recommendations (which I will probably use rather than this hand-made version :P )

NyuB | 2 months ago

I think all of this is available in lazygit as well, which seems to still be way too unknown, despite the 50k stars: https://github.com/jesseduffield/lazygit

the_duke | 2 months ago

Not trying to downplay your work, making cool tools is always cool, BUT:

1. You can also just configure Git to use whatever editor you'd like.

https://git-scm.com/docs/git-config#Documentation/git-config...

2. You don't need to be a Vim pro to interactive rebase effectively. Most of it will be `dd` to remove a line, `p` to paste a line, `j`/`k` to move up and down lines, and `cw` to change `pick` to `edit`, etc. Spend 15m with `vimtutor` (which is probably available on your system) and you'll never be afraid of vim again.

3D39739091 | 2 months ago

Nice work! Lazygit is a pretty popular too that does git stuff via a TUI (everything from rebasing to nuking your local)

[1] https://github.com/jesseduffield/lazygit

syntaxing | 2 months ago

Anyone using magit?

kleiba | 2 months ago

Is there anyone else that enforces a simple "just squash & merge everything from PRs into main" across the entire team?

I'm comfortable git fooing w/e is necessary, but ever since we adopted this, git related conversations went to almost zero. It's great.

Olshansky | 2 months ago

I got fairly good mileage with https://github.com/MitMaro/git-interactive-rebase-tool/ which has similar goal

bruwozniak | 2 months ago

What is the main purpose of the ocli project on GitHub, and how can I use it in my command-line applications?

morgansolis | 2 months ago

Watching the screencast I realize how often text and an editor are a replacement for lists, treeviews, tabs, scrollbars etc.

Maybe AI is the answer for enforcing the format and for discoverability since it provides GUI-like hand holding without the hassle of actually writing GUI code.

xuhu | 2 months ago