Show HN: I made a git rebase TUI editor
115 points| NyuB | 1 year ago |github.com | reply
The notable features are: - Move commits up and down, fixup, drop - Rename commits from the editor (without having to stop for a reword during the rebase run) - Visualize modified files along commits - 'Explode' a commit ,creating a commit for each modified file (a thing I found myself doing quite often)
Feedbacks (both on the tool and the code) and contributions welcome, hope it could fit other people needs too !
[+] [-] hu3|1 year ago|reply
[+] [-] ivanjermakov|1 year ago|reply
It would simplify these two functions to just `succ` and `pred`
[1]: https://hackage.haskell.org/package/base-4.20.0.1/docs/GHC-E...
[+] [-] oniony|1 year ago|reply
Not sure what this project is now, it certainly does not seems to be a TUI focused on Git rebases.
[+] [-] OJFord|1 year ago|reply
https://github.com/NyuB/ocli?tab=readme-ov-file#newbase
[+] [-] Bigpet|1 year ago|reply
You need to scroll down to the `Newbase` Section. It's apparently both the repo for some kind of cli framework and for the rebase tool.
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] nesk_|1 year ago|reply
Congrats for the release!
https://github.com/sjurba/rebase-editor
[+] [-] DarmokJalad1701|1 year ago|reply
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.
[+] [-] lostdog|1 year ago|reply
Nothing beats Meld for me, but if you're on a remote GUI-less machine, there aren't good options.
[+] [-] arcanemachiner|1 year ago|reply
https://github.com/jesseduffield/lazygit
(I am not actually sure what a three-way merge conflict is though TBH.)
[+] [-] shawn_w|1 year ago|reply
[+] [-] mro_name|1 year ago|reply
[+] [-] Degorath|1 year ago|reply
I do not recall what problem I had with that particular one, but I ended up just using raw Notty in the end.
[+] [-] NyuB|1 year ago|reply
[+] [-] the_duke|1 year ago|reply
[+] [-] rkangel|1 year ago|reply
I end up with a log view and then copy and paste commit hashes to do different things. Or use Sublime Merge which is great, but doesn't work over SSH.
[+] [-] amar-laksh|1 year ago|reply
[+] [-] chb|1 year ago|reply
[+] [-] jckahn|1 year ago|reply
[+] [-] shafyy|1 year ago|reply
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] 3D39739091|1 year ago|reply
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.
[+] [-] serced|1 year ago|reply
[+] [-] samtheprogram|1 year ago|reply
You’re getting downvoted (probably because of the mini Vim tutorial in #2) while the author of the post wrote a whole TUI because they didn’t know to change their EDITOR variable.
Learn your tools, people. This is the equivalent of a contractor taping rulers together because they didn’t realize their bag comes with a tape measure.
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] syntaxing|1 year ago|reply
[1] https://github.com/jesseduffield/lazygit
[+] [-] NyuB|1 year ago|reply
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] kleiba|1 year ago|reply
[+] [-] amake|1 year ago|reply
Every time I see tools like this I think "ah, the normies are reimplementing Magit".
[+] [-] koito17|1 year ago|reply
Never bothered learning the Git CLI since it's always seemed cumbersome compared to Magit. That is the other major advantage to Magit, the UI is discoverable, there is always a subwindow displaying all available commands and most of the commonly used flags. (Less commonly used flags can be displayed by adjusting the transient level.)
[+] [-] _ix|1 year ago|reply
[+] [-] ckolkey|1 year ago|reply
[+] [-] SoftTalker|1 year ago|reply
[+] [-] umanwizard|1 year ago|reply
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] Olshansky|1 year ago|reply
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.
[+] [-] AnthOlei|1 year ago|reply
My reviewers love when I write “review commit by commit” in the PR description. Then each individual commit has its own reasoning, and you can mentally switch into reviewing if that commit does it’s one thing it’s supposed to do correctly. I will accept the argument that each commit should be its own PR though :)
[+] [-] dbalatero|1 year ago|reply
The PR is the unit of work, people get too hung up on the PR's individual commits.
Worst: rebase and merge - you end up with your coworker's broken WIP commits all over master, and have a terrible git revert story
OK: merge commit - you can revert, but there is a less intuitive `-m 1` flag (IIRC?) you have to pass into revert, and IMO you rarely need the intermediate history.
Best: squash & merge - you get one single commit representing the unit of work merging in, git revert is dead easy
Also setting the commit message in main to the `{title} (#{prNum})\n\n{prDescription}` format preserves all the good context from your PR and lets you get back to it if you need.
[+] [-] Chromozon|1 year ago|reply
[+] [-] zabil|1 year ago|reply
[+] [-] Degorath|1 year ago|reply
I firmly believe GitHub makes reviewing individual commits in a PR so painful that I'd rather not do that.
[+] [-] keybored|1 year ago|reply
No. This kind of policy has plenty of downsides[1] and the upsides are relatively minor.
[1] https://news.ycombinator.com/item?id=41653892
[+] [-] kccqzy|1 year ago|reply
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] bruwozniak|1 year ago|reply
[+] [-] unknown|1 year ago|reply
[deleted]
[+] [-] morgansolis|1 year ago|reply
[+] [-] xuhu|1 year ago|reply
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.
[+] [-] chx|1 year ago|reply
https://hachyderm.io/@inthehands/112006855076082650
> You might be surprised to learn that I actually think LLMs have the potential to be not only fun but genuinely useful. “Show me some bullshit that would be typical in this context” can be a genuinely helpful question to have answered, in code and in natural language — for brainstorming, for seeing common conventions in an unfamiliar context, for having something crappy to react to.
> Alas, that does not remotely resemble how people are pitching this technology.