Skip to content

Resume commit message after pre-commit hook failure. #126

@damian-giebas-solidstudio

Description

When using better-commits with pre-commit hooks, if the commit fails due to hook failures (e.g., linting errors), the user needs to go through the entire better-commits flow again after fixing the issues and running git add -u.

Requested Feature:

  • Save the commit message in a way that allows git commit to reuse it after hook failures
  • Or provide a command like better-commits --resume to reuse the last generated message
  • Or automatically detect staged changes and ask if user wants to reuse the previous message

Use case

better-commits           # User creates message interactively  
# ❌ Pre-commit fails
# User fixes code
git add -u
git commit               # Should reuse the previous message
# OR
better-commits --resume  # Reuse last message without going through flow again

Best regards.
Damian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions