Skip to content

Core commit commands - msg, create, amend, undo #2

@jordanpartridge

Description

@jordanpartridge

Overview

Implement core commit commands with conventional commit support.

Commands

commit msg

Generate commit message from staged changes.

commit msg                      # Analyze diff, suggest message
commit msg "feat: add auth"    # Validate/format message
commit msg --type feat         # Specify type
commit msg --scope api         # Specify scope
commit msg --breaking          # Mark as breaking change

commit create (or just commit)

Stage and commit in one flow.

commit                          # Interactive: select files, write message
commit -a                       # Stage all, prompt for message
commit -a -m "feat: X"         # Stage all with message
commit --fixup HEAD~2          # Fixup commit

commit amend

Safely amend commits.

commit amend                    # Amend with editor
commit amend --no-edit         # Keep message, add staged
commit amend --author          # Fix author

commit undo

Undo commits safely.

commit undo                     # Soft reset HEAD~1
commit undo --hard             # Hard reset (with warning)
commit undo 3                  # Undo last 3 commits

Conventional Commits Format

<type>(<scope>): <description>

[optional body]

[optional footer(s)]

Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions