🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1.2 KiB
1.2 KiB
Smart Git Push Script 🚀
Token-efficient git workflow for development.
Usage
Auto-commit (recommended for small changes):
./git_push.sh
Custom commit message:
./git_push.sh "Fix critical bug in player profiles"
Features
- Auto-detection: Recognizes file types and generates appropriate commit messages
- Smart categorization: Groups changes by type (Python code, web interface, database, etc.)
- Error handling: Stops on git errors, graceful handling of edge cases
- Minimal output: Just shows success/failure, saves tokens
- Safety checks: Verifies git repo, checks for changes before committing
Auto-Generated Messages
Examples of what the script generates:
Update Python code - 2024-01-15 14:30Update web interface, bot modules - 2024-01-15 14:31Update database, configuration - 2024-01-15 14:32
Token Savings
- Before: ~200-300 tokens per git operation
- After: ~20-50 tokens per git operation
- Savings: ~75% reduction in git-related token usage
Claude Usage
When Claude needs to push changes:
Please run: ./git_push.sh
Instead of multiple git commands + output analysis.