Skip to content

feat: interactive rebase from a commit's menu: reorder, squash, fix up or drop the commits after it - #23

Merged
Lars- merged 1 commit into
mainfrom
feat/interactive-rebase
Nov 6, 2026
Merged

Lars- merged 1 commit into
mainfrom
feat/interactive-rebase

Conversation

@Lars-

@Lars- Lars- commented Nov 6, 2026

Copy link
Copy Markdown
Owner

What this changes

Right-click a commit in the graph and pick Interactive rebase onto this commit… to put together an interactive rebase in the centre. It lists the commits the rebase takes along, newest first like the graph, and for each you can move it up or down and pick, squash, fix up or drop it. Squash and fixup meld a commit into the one below it (squash keeps both messages, fixup that of the one below); a dropped commit is struck through. Start rebase runs it; it stays disabled, with the reason on hover, while the oldest commit it keeps would have nothing to meld into. Cancel or Escape goes back to the graph.

It runs your own git rebase -i, with the list written over git's own, so hooks, signing and config work as on the command line. The list is the one git rebase -i would show: commits without a copy in the target, leaving out merges. When the commits change outside GitCraft while the list is open, it starts again from what is there now, so a rebase never leaves out a commit it did not show. A rebase that stops at a conflict shows the existing bar (continue, skip, abort), and undo takes back the whole rebase.

Roadmap: "Interactive rebase", part 1. Rewording and dragging in the graph come next.

How it is tested

  • Core test against a real repository: the list for a commit, for a branch with a cherry-picked copy (left out) and for HEAD (empty); a rebase in a new order with squash, fixup and drop gives the expected messages and files; undo takes it back to where it started.

  • App tests through the accessibility tree: reorder, squash and drop three commits and start (Start disabled while the oldest kept commit is a squash, also after the one below it is dropped); and a list that starts again when a commit is added outside, so that commit is not dropped, plus the message when there is nothing to rebase.

  • Tried in the app: moved a fixup! commit next to its commit, fixed it up and dropped another (result checked with git log and the files), undid the rebase, and a rebase that stopped at a conflict, then aborted.

  • cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace pass

  • It adds as little code as the change needs, and removes what it makes unnecessary

  • Nothing in it comes from GitKraken or another closed-source client (see CONTRIBUTING.md)

@Lars-
Lars- merged commit 8872d2f into main Nov 6, 2026
7 checks passed
@Lars-
Lars- deleted the feat/interactive-rebase branch November 6, 2026 10:16
@Lars- Lars- mentioned this pull request Nov 6, 2026
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

Successfully merging this pull request may close these issues.

1 participant