← Back to Agent Rule

Git Workflow for AI Agent Development

2026-08-04 · 8 min read · Git · Workflow

Branch Strategy

main        → production-ready
develop     → integration branch
feature/*   → new features
fix/*       → bug fixes
docs/*      → documentation

Pre-commit Hooks

# .pre-commit-config.yaml
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v4.5.0
    hooks:
      - id: trailing-whitespace
      - id: end-of-file-fixer
      - id: check-yaml

CI/CD Pipeline

GitHub Actions runs linting, type checking, and unit tests on every PR. Merged PRs to main trigger automatic deployment via Docker image build and push.

git checkout -b feature/new-tool
git commit -m "feat: add browser tool integration"
git push origin feature/new-tool
gh pr create --base main --title "Browser tool"