git-commit
Organize Git Commits with Interactive Staging
Également disponible depuis: Bae-ChangHyun,21pounder,21pounder,github
Managing multiple changes across files makes commit organization challenging. This skill provides step-by-step guidance for breaking changes into logical, atomic commits using git interactive staging features.
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "git-commit". I changed 3 files with a bug fix, a new feature, and some refactoring. How do I organize these?
Résultat attendu:
- Run 'git status' to see all changed files
- Use 'git add -p' to interactively stage hunks
- Stage bug fix changes first and commit with a descriptive message
- Stage feature changes and commit separately
- Stage refactoring changes and commit last
- Verify each commit with 'git diff --cached'
Utilisation de "git-commit". What are the keyboard shortcuts for interactive staging?
Résultat attendu:
- Press 'y' to stage the current hunk
- Press 'n' to skip this hunk
- Press 's' to split into smaller hunks
- Press 'q' to quit and keep already-staged hunks
- Press '?' to see all available options
Utilisation de "git-commit". Should I stage whole files or individual hunks?
Résultat attendu:
- Stage whole files when all changes belong to one logical commit
- Use hunk staging when a file contains multiple concerns
- Split hunks when changes are unrelated within the same area
- Trust your judgment based on what makes review easier
Audit de sécurité
SûrThis is a documentation-only skill containing static markdown with git best practices. No executable code, network calls, or data access. Pure educational content describing interactive staging commands.
Facteurs de risque
🌐 Accès réseau (2)
Score de qualité
Ce que vous pouvez construire
Clean Up Feature Branches
Organize mixed changes into separate commits for features, fixes, and refactors before creating pull requests.
Improve Team Commit History
Guide team members to create atomic commits that are easy to review and understand during code reviews.
Follow Contribution Guidelines
Maintain clean commit history in open source projects that require organized, well-structured commits.
Essayez ces prompts
Show me how to use git add -p to stage specific parts of my changes
I have bug fixes and new features in the same files. How do I split them into different commits?
How can I review exactly what will be included in my next commit before I commit it?
A hunk is too large and contains multiple unrelated changes. How do I split it into smaller pieces?
Bonnes pratiques
- Review staged changes with 'git diff --cached' before each commit to verify what will be committed
- Use conventional commit format for clear, standardized commit messages
- Keep commits atomic by ensuring each commit represents one logical change that can be reverted independently
Éviter
- Avoid committing unrelated changes together in a single commit
- Do not stage entire files without reviewing the specific changes first
- Never skip commit message quality for faster delivery