Git Preferences and Workflow

This document outlines the git workflow preferences for this project.

Commit Workflow

When the user says "commit" or "commit the code", this means:

  1. Stage all changes including:

    • Modified files
    • New files (untracked files)
    • Deleted files
    • Use git add -A or git add . to stage everything
  2. Create a commit with a descriptive message

    • Use conventional commit format
    • Include the AI assistant attribution
  3. DO NOT PUSH unless explicitly instructed

    • Under NO CIRCUMSTANCES push the code without be explicitly told to
    • Only run git commit, never git push
    • Wait for explicit instruction like "push the code" or "push to remote"
  4. DO NOT COMMIT unless explicitly instructed

    • Under NO CIRCUMSTANCES commit the code without be explicitly told to
    • Only run git commit, never git push
    • Wait for explicit instruction like "commit the code here"

Example Workflow

# When user says "commit the code"
git add -A                    # Stage all changes including new files
git status                    # Show what will be committed
git commit -m "feat: ..."     # Create commit locally

# Only when user explicitly says "push"
git push origin main          # Push to remote

Important Notes

  • Never push code automatically after committing
  • Always stage new files when committing
  • Use git add -A to ensure all changes are included
  • Wait for explicit push instructions from the user

AI Assistant Guidelines

AI assistants should:

  1. Always reference this document when handling git operations
  2. Stage ALL changes including new files when committing
  3. Never push unless explicitly told to
  4. Confirm what will be committed by showing git status

On this page