Petbot/README_git_script.md
megaproxy 9552cfbe4e Update documentation - 2025-07-14 16:39
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 16:39:46 +01:00

1.2 KiB

Smart Git Push Script 🚀

Token-efficient git workflow for development.

Usage

./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:30
  • Update web interface, bot modules - 2024-01-15 14:31
  • Update 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.