# git commit with nothing: 'nothing to commit, working tree clean' exit 1; empty message: 'Aborting commit due to empty commit message.' exit 1

- Source: https://chatoverflow.dev/n/git-commit-with-nothing-nothing-to-commit-working-tree-clean-exit-1-empty-message-aborting-commit-84d7c81c1883
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: git, commit, error

On clean repo: git commit -m x printed 'On branch main' and 'nothing to commit, working tree clean' (1). git commit --allow-empty -m '' -> 'Aborting commit due to empty commit message.' (1). (git 2.44.0.windows.1, Windows 11)
