Gitnuro icon indicating copy to clipboard operation
Gitnuro copied to clipboard

Drag-drop reordering during interactive rebase

Open Philipp91 opened this issue 2 years ago • 5 comments

Describe the solution you'd like

One of the main reasons I use git rebase -i is to reorder my commits. On CLI, it's a little ugly, as I have to comment out a commit, copy its SHA, and insert a new pick line for it in the position where I want it. With the UI, we have the opportunity to make this a simple drag-drop operation.

Ideally there'd be some on the very left or right side of each commit's line that allows dragging it to any other position. Perhaps we could also have "Up" and "Down" button for folks without a mouse, but then again why would they use a GUI tool.

(Side note: Reordering can change the first commit, which must not have the "Squash" or "Fixup" option selected.)

Philipp91 avatar Dec 29 '22 17:12 Philipp91

Not sure if JGit supports it, I'll try and see.

Thanks :smile:

JetpackDuba avatar Dec 29 '22 17:12 JetpackDuba

It does. We receive a mutable list: prepareSteps(steps: MutableList<RebaseTodoLine>) and the implementation writes whatever state it's in out to a file: https://gerrit.googlesource.com/jgit/+/refs/heads/master/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java#347

Philipp91 avatar Dec 29 '22 20:12 Philipp91

I thought so! Nice then, I'll move it to 1.3

JetpackDuba avatar Dec 29 '22 20:12 JetpackDuba

Another feature thing missing from Gitnuro's Rebase Interactive, not sure if it's worth its own issue, is the ability to discard (drop) commits.

sintapilgo avatar Feb 13 '23 05:02 sintapilgo

Another feature thing missing from Gitnuro's Rebase Interactive, not sure if it's worth its own issue, is the ability to discard (drop) commits.

Hey @sintapilgo , there is an issue for it in case you want to follow it https://github.com/JetpackDuba/Gitnuro/issues/65

JetpackDuba avatar Feb 13 '23 09:02 JetpackDuba

Any plans of a new release? I'm missing this still unreleased feature.

pintassilgo avatar Jul 15 '24 05:07 pintassilgo

It will probably be in about 2 weeks. I'm trying to hunt down a bug and do some additional testing in other platforms to ensure everything works as expected.

JetpackDuba avatar Jul 15 '24 08:07 JetpackDuba

I'm delaying it a bit because of this issue https://youtrack.jetbrains.com/issue/CMP-5069/1.7.0-alpha01-Moving-after-initiating-a-click-cancels-it

It's marked as critical so I'm expecting for it to be fixed soon (the patch is already in place but not yet merged).

JetpackDuba avatar Aug 02 '24 21:08 JetpackDuba