Skip to content

Adds: prompt to allow empty commit messages#5710

Open
Abiggj wants to merge 1 commit into
jesseduffield:masterfrom
Abiggj:feat/empty-commit-msg-5641
Open

Adds: prompt to allow empty commit messages#5710
Abiggj wants to merge 1 commit into
jesseduffield:masterfrom
Abiggj:feat/empty-commit-msg-5641

Conversation

@Abiggj

@Abiggj Abiggj commented Jun 18, 2026

Copy link
Copy Markdown

This change introduces #5641 a confirmation prompt when attempting to commit without a message. Instead of blocking the commit with an error, lazygit now presents a menu allowing you to proceed with an empty message (automatically adding the --allow empty-message flag) or return to the editor.

  • I18n: Added CommitWithoutMessagePrompt to the translation set.
  • UI: Updated HandleCommitConfirm to show a menu with explicit 'y' (confirm) and 'n' (close) bindings when the commit summary is empty.
  • Git Commands: Modified commitMessageArgs to append the --allow-empty-message flag when both summary and description are empty or
    whitespace-only.
  • Tests: Added unit tests to pkg/commands/git_commands/commit_test.go to verify the correct construction of git commands for empty commits
    and rewords.

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