Files
gh-johnclyde-clydehub/commands/stage.md
2025-11-30 08:28:27 +08:00

1.0 KiB

description
description
Intelligently stage files based on their purpose

Smart file staging with three categories:

  1. Check git status and categorize untracked/modified files into:

    • Project files: Source code, tests, configs that belong in the repo
    • Git-ignored: Files matching .gitignore patterns (node_modules, pycache, .env, etc.)
    • Temporary/scratch: Random scripts, test files, debug outputs created during development
  2. Detection heuristics:

    • Project files: In src/, tests/, config files (package.json, pyproject.toml, tsconfig.json, etc.), documentation
    • Git-ignored: Check against .gitignore patterns
    • Temporary: test*.py, scratch., debug., temp.*, random filenames not following project conventions
  3. Present categorization to user with clear breakdown

  4. Ask for confirmation before staging project files

  5. Suggest adding temporary files to .gitignore if they match patterns

IMPORTANT: Never blindly stage all files. Always categorize and confirm with user.