Skip to content

Allow empty commits #587

@AdrienMatricon

Description

@AdrienMatricon

The context:

  • By default, running git commit with nothing staged returns an error code, with a message nothing to commit, working tree clean
  • To create an empty commit, an option must be passed : git commit --allow-empty

The issue:

  • In sourcegit, trying to commit with nothing staged matches the default behavior and prints an error message saying No files added to commit!
  • There is no way to tell it that it is on purpose

Possible solutions:

  • Adding a "Commit anyway" button to the error message
  • Adding an Allow empty checkbox besides the ones for Auto-stage and Amend

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions