GitHub Actions Tool¶
Comprehensive Git and GitHub operations management script for streamlined version control workflows.
Features¶
- Branch Management: Create, switch, merge, and delete branches
- Repository Operations: Status, pull, push, and synchronization
- Pull Request Management: Create and manage GitHub pull requests
- Safety Features: Dry-run mode, force protection, and verification
- Backup & Recovery: Rollback operations and conflict resolution
- Automation Support: Silent mode for scripted operations
Available Commands¶
Repository Status & Sync¶
status- Show working directory and branch statuspull- Pull latest changes from remotepush- Push local commits to remotesync- Synchronize with remote repository
Branch Operations¶
branch [name]- Create or switch to branchmerge [branch] [--dry-run]- Merge specified branchcleanup- Remove merged branches
Pull Request Management¶
pr [title]- Create pull request with titlerollback [commit]- Rollback to specific commit
Command-Line Options¶
--force- Enable force operations (use with caution)--silent- Run in silent mode for automation--dry-run- Preview operations without executing--no-verify- Skip pre-commit hooks
Usage Examples¶
# Check repository status
./docs/actions/github-actions.sh status
# Create and switch to feature branch
./docs/actions/github-actions.sh branch feature/new-feature
# Merge with dry-run preview
./docs/actions/github-actions.sh merge feature/new-feature --dry-run
# Create pull request
./docs/actions/github-actions.sh pr "Add new feature implementation"
# Synchronize with remote
./docs/actions/github-actions.sh sync
Safety Features¶
- Dry-Run Mode: Preview changes before execution
- Force Protection: Prevents accidental destructive operations
- Verification Checks: Pre-commit validation and conflict detection
- Status Validation: Working directory and remote status checks
File Locations¶
- GitHub Actions Script:
docs/actions/github-actions.sh
Requirements¶
- Git installed and configured
- GitHub CLI (gh) for pull request operations
- Network access for remote operations
- Proper repository permissions