Skip to content

feat(cli): Default 'commit' to staged-only and add '--all' flag #73

@duizendstra

Description

@duizendstra

The current contextvibes factory commit command automatically stages all modified and untracked files before committing. This behavior prevents developers from creating atomic commits when multiple, unrelated changes exist in the working directory. It forces the bundling of logically separate changes, which is contrary to best practices for version control and complicates code reviews.

Proposed Solution:

  1. Change the Default: The command should only commit files that have already been manually staged by the user (via git add). This aligns with the standard, expected behavior of git commit.
  2. Add an --all Flag: Introduce a new flag, -a or --all, to replicate the current "stage everything" behavior for users who want that convenience.

This change would significantly improve the tool's usability and help enforce our project's standard of creating small, atomic commits.


Context

  • CLI Version: dev
  • OS/Arch: linux/amd64
  • Filed by: @duizendstra

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions