phil294 / GitLG

A free, interactive Git UI for VSCode
MIT License
184 stars 19 forks source link

Feature request: interactive rebase #143

Open eliaharm opened 1 month ago

eliaharm commented 1 month ago

Hello, I see there is an option rebase when you right click on a commit. Could you add an option or choice to do an interactive rebase. I use it mostly to squash multiple commits into a single commit. Thanks,

phil294 commented 1 month ago

We've got an issue for squashing already in #75. I'm not sold on implementing a full graphical version of rebase -i in the UI. This would probably be very complex and difficult to navigate for the user. You'd essentially have to know what rebase -i is and how to use it exactly, at which point you might as well open a terminal and do it in there. It's a rare use case used for fixing up mistakes, after all.

Instead, I think we should identify the common use cases and implement them as standalone automated commands, so without interactive rebase. For squash, this would be reset --soft with commit for multi-command actions. Another example, already implemented, is the "Delete" action for commits.

Adding new default actions is easy, just needs someone to figure out if they are important and then cobble together the git commands. That's what the issues here are for basically, anyway.