#!/bin/bash # Optional commit message and branch name COMMIT_MSG=${1:-"changes in gitignored files"} BRANCH_NAME=${2:-"dev"} echo "🔄 Cleaning cache files..." # Remove __pycache__ directories and .pyc files find . -type d -name '__pycache__' -exec rm -rf {} + find . -type f -name '*.pyc' -delete # Remove .DS_Store files find . -name '.DS_Store' -delete echo "✅ Cleanup done." # Git operations echo "📦 Adding changes to Git..." git add . echo "📝 Committing with message: $COMMIT_MSG" git commit -m "$COMMIT_MSG" echo "🚀 Pushing to $BRANCH_NAME branch..." git push origin $BRANCH_NAME echo "✅ Done!"