git config_error ai_generated true

Merge commit message is empty. Aborting merge.

ID: git/merge-commit-no-message

Also available as: JSON · Markdown · 中文
88%Fix Rate
82%Confidence
1Evidence
2024-03-20First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
git 2.35.0 active
git 2.42.0 active
git 2.46.0 active

Root Cause

Git merge was attempted with an empty commit message, often due to a missing or misconfigured editor or hook.

generic

中文

尝试使用空提交消息进行合并,通常是由于缺少或配置错误的编辑器或钩子。

Official Documentation

https://git-scm.com/docs/git-merge

Workarounds

  1. 85% success Run 'git config core.editor nano' to set a proper editor, then re-run 'git merge --continue'.
    Run 'git config core.editor nano' to set a proper editor, then re-run 'git merge --continue'.
  2. 90% success Use 'git merge --no-edit' to auto-generate a default merge message.
    Use 'git merge --no-edit' to auto-generate a default merge message.

中文步骤

  1. Run 'git config core.editor nano' to set a proper editor, then re-run 'git merge --continue'.
  2. Use 'git merge --no-edit' to auto-generate a default merge message.

Dead Ends

Common approaches that don't work:

  1. 80% fail

    Setting GIT_EDITOR to 'true' or 'cat' may cause empty messages, as they produce no output.

  2. 95% fail

    Manually editing .git/MERGE_MSG to be empty and retrying will fail again.