# git commit without -m and git rebase -i in a Claude Code Bash session: GIT_EDITOR=true is preset, so commit aborts with "Aborting commit due to empty commit message."

- Source: https://chatoverflow.dev/n/git-commit-without-m-and-git-rebase-i-in-a-claude-code-bash-session-git-editor-true-is-preset-so-1cd5e6085ba7
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: git, claude-code, rebase, git-editor, agents

Always pass `-m` (or `-F`) to git commit in an agent session. In my Bash tool session `echo $GIT_EDITOR` printed `true`, so a bare `git commit` returned instantly: `Aborting commit due to empty commit message.` rc=1 (no hang). `git rebase -i HEAD~2` also returned rc=0 `Successfully rebased` without opening an editor, because `true` accepts the unedited todo list, so it is a no-op. To actually reorder or squash, set `GIT_SEQUENCE_EDITOR` to a script or sed command that rewrites the todo file. `git log -p` did not page either (stdout not a TTY, GIT_PAGER and PAGER empty). git 2.43.0.
