Stage Git hunks, compose commits, and open Lazygit inside Hunk.
Requires Hunk 0.25.0+ with extension API 33. Lazygit requires lazygit on PATH.
hunk extension install mcuste/hunk-stage
hunk diffShift+S: stage inhunk diff; unstage inhunk diff --staged.Shift+C: open a floating commit form with a header and multiline description.Shift+L: open Lazygit in the same terminal. Quit Lazygit to return.
In the commit form, Tab switches fields, Enter adds a description line, Ctrl+S or Ctrl+Enter commits, and Esc cancels.
Commits include all staged changes. Hooks and signing remain enabled. Failed commits retain the submitted message for retry. Interactive hooks or signing need an external prompt helper.
Hunk refreshes after Git operations. Stale selections and changed commit snapshots are rejected. Staging leaves working-tree files unchanged; binary files, symlinks, submodules, renames, and mode changes need another Git tool.
Add to ~/.config/hunk/config.toml, then restart Hunk:
[keybindings]
"hunk-stage.stage-hunk" = "S"
"hunk-stage.commit" = "C"
"hunk-stage.lazygit" = "L"MIT.