Show HN: Rebase-editor, a simple CLI app specifically for Git interactive rebase
github.com
github.com
nnoremap <buffer> <silent> <LocalLeader>p :Pick<CR>
nnoremap <buffer> <silent> <LocalLeader>s :Squash<CR>
nnoremap <buffer> <silent> <LocalLeader>e :Edit<CR>
nnoremap <buffer> <silent> <LocalLeader>r :Reword<CR>
nnoremap <buffer> <silent> <LocalLeader>f :Fixup<CR>
nnoremap <buffer> <silent> <LocalLeader>c :Cycle<CR>
This way I just press e.g. "\p" or "\f" (my localleader is \) to change the line, which makes it just one more keypress than your command, but I have the full power of Vim and I don't have to go about changing my editor.Also I tried to make this app to have it do only one thing and do that one thing well. With no config, and no learning how to use it. Arrows to find your line, custom keys to change the action-word. Shift to select multiple lines, Ctrl to move/reorder line(s) and some extra niceties like undo/redo. Of course you can do all that and much more with vim. My point is that it is a strength of the app that it doesn't do anything else. I don't need it to do anything else. It only needs to do interactive rebase.
But of course I don't expect vim and emacs aficionados to take much interest in this app. My core audience are those who have to google 'how to exit vim' every time they venture a rebase. ;)
Every git operation I've done is effortless with Magit: interactive rebase, selective staging (line based, not just hunk based), cherry picking, reordering commits and squashing, creating/pushing to/deleting local/remote branches, viewing graphical branch log, .. (list goes on).
git commit --squash <sha>
git commit --fixup <sha>
git rebase -i --autosquash ...
Autosquash puts things in the right order.Of course, you have to pick the target commit at the fixup commit time. But that is less error-prone then later trying to remember what such and such commit was intended to combine with.
That being said, my tool will work nicely with autosquash. All 'fixup!' commits will be reordered and prefixed with fixup just like with the default editor. So you might say that you don't need my tool since autosquash is all you need, but I often use it to do manual reordering, editing and rewording. And in those cases I find it very useful.
$ git config --global rebase.autosquash trueDistribution is a little trickier since there is no package manager ala npm, however it's a little easier in that you don't need anything except for the binary. For people who have Go installed they just `go get REPO` and it's installed, for others they can just wget the binary into their bin.
mercurial queues - far and away the my favorite patch queue implementation - https://developer.mozilla.org/en-US/docs/Mozilla/Mercurial/Q...
stacked git - a solid git patch queue - http://procode.org/stgit/doc/tutorial.html
Reading the linked documentation for patch queues, it isn't clear to me how they materially differ from git's interactive rebase. (Modulo hg's mutable/immutable differences.)
How many times per day are you actually rebasing interactively? I myself might do it once per week and that in a project with 6 developers with a fairly strict commmit policy. I can only imagine having a job where doing interactive rebases is the only thing you do before you get a return of investment on a. building the tool (you) and b. learning how to use it (others).
You could probably have learned to use vim in the time it took you to build this, at least the basics. You could also start learning about vim by enabling vim-mode in your editor. Most editors have one at least.
Vim is awesome and my app could never do a fraction of the stuff vim does. But my app can do interactive rebase. And since it is the only thing my app can do, it does it better then vim.
Text: https://docs.starcounter.io/tutorial/
Code: https://github.com/StarcounterApps/HelloWorld/commits/tutori...
Interactive rebase instructions: https://github.com/StarcounterApps/HelloWorld/wiki
:%s/pick/squash/gc
Also, I've gotten used to using git commit --fixup with git rebase --autosquash, so I rarely need to interactively rebase these days.