Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotkey for starting an interactive rebase from the commit list / log #966

Closed
athre0z opened this issue Oct 26, 2021 · 4 comments
Closed

Comments

@athre0z
Copy link

athre0z commented Oct 26, 2021

Is your feature request related to a problem? Please describe.
I tend to do a lot of interactive rebasing, typically at least 3-5 times per day. My workflow for that is invoking git log, locating the commit that I want to start cleaning up at, copying the SHA, typing git rebase -i <hash>. In some cases, I'll also specify --onto, to rebase on a different branch.

Describe the solution you'd like
It would be rather convenient to be able to run gitui, switch to the Log [2] tab, select the right commit via cursor keys and then just have a keybind, e.g. ^I, for doing that. I'd imagine that it would then pop a modal where I can select a branch to rebase onto, with the default being the current branch. Upon confirming with enter, it would exit gitui and let me perform my typical interactive rebase workflow.

Describe alternatives you've considered
It would be even better to have the whole interactive rebase support with a nice UI within gitui, like suggested in #32. However, since this is a very significant amount of work, my proposed version seems like a decent stop-gap for me.

@extrawurst
Copy link
Owner

#32 still is the right path here though. doing your proposal right is also not trivial and a deviation from the current approach: the things gitui supports are supported all inside the application.

I think interactive rebase will be one of the big next features anyway since we now have most of the ground work done: selecting commits in the log, supporting a repo in states like rebase and so on.

@extrawurst
Copy link
Owner

You could help me with this though and write a couple of user stories like how you specifically use IR, since I myself very rarely need to do it.

@athre0z
Copy link
Author

athre0z commented Oct 26, 2021

doing your proposal right is also not trivial

Oh, interesting. I would've assumed it to involve pretty much just registering a new hotkey whose handler then spawns a modal for branch selection (which I assumed you probably already have for some other stuff, since most git UIs show branch selection UIs in a lot of places), finally starting the IB by invoking git rebase -i or some libgit magic. I'll however have to admit that I don't know anything about libgit and git internals in general, so this is probably naive in some major way.

a deviation from the current approach: the things gitui supports are supported all inside the application.

Yes, this is definitely true.

You could help me with this though and write a couple of user stories like how you specifically use IR, since I myself very rarely need to do it.

Sure, absolutely. I'm probably going to get flamed for my inefficient workflows by some git enthusiasts, but I'm willing to risk that. 😅 What format would you prefer for that? Do you want me to just post that as a response to #32?

@extrawurst
Copy link
Owner

closing in favour of #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants