Files
airmq-android/.cursor/commands/commit.md
2026-03-02 20:23:02 +01:00

1.3 KiB

Commit

Overview

Commit changes with a two-tier strategy: prioritize changes from this chat, then fall back to any other uncommitted changes.

Steps

  1. Identify changes from this chat

    • From the current conversation context, determine which files you (the agent) have created, modified, or deleted in this chat.
    • List these "chat-touched" file paths.
  2. Check git status

    • Run git status --short in each workspace root to see uncommitted changes.
  3. Choose what to commit

    • If any uncommitted changes exist in chat-touched files: stage and commit only those chat-touched files. Use a commit message that summarizes the work done in this chat.
    • Else (all chat-touched changes are already committed): stage and commit any other uncommitted changes. Use a commit message that summarizes those remaining changes.
  4. Perform the commit

    • Stage the chosen files with git add (exclude .idea/ and other IDE/config files unless they are part of the intended changes).
    • Run git commit with a clear, conventional commit-style message.
    • Use PowerShell-safe syntax (e.g. ; instead of &&, avoid bash heredoc).

Notes

  • If there are no uncommitted changes at all, report that and do nothing.
  • When multiple workspace roots exist, apply this logic per repo (check status in each root and commit accordingly).