axonhub / docs /en /development /git-workflow.md
llzai's picture
Upload 1793 files
9853396 verified

Git Workflow


Development Workflow

  1. Create a feature branch

    git checkout -b feature/your-feature-name
    
  2. Make changes and test

    • Write code
    • Add tests
    • Run tests to ensure they pass
    • Run linter to check code quality
  3. Commit changes

    git add .
    git commit -m "feat: your feature description"
    
  4. Push and create Pull Request

    git push origin feature/your-feature-name
    

Pre-commit (prek)

This repository includes a .pre-commit-config.yaml. prek is a drop-in replacement for pre-commit.

Install prek

  • macOS/Linux (Homebrew)

    brew install prek
    
  • Python (uv)

    uv tool install prek
    

You can also run it once without installing:

uvx prek --version
  • Python (pipx)

    pipx install prek
    
  • Node.js (pnpm)

    pnpm add -D @j178/prek
    
  • Standalone installer (Linux/macOS)

    curl --proto '=https' --tlsv1.2 -LsSf https://github.com/j178/prek/releases/latest/download/prek-installer.sh | sh
    

If you use the standalone installer, prefer copying the installer URL from the latest GitHub release.

If you're already using pre-commit in this repository:

  • Replace pre-commit commands in your scripts/docs with prek.
  • Reinstall hooks once with prek install -f.

Run hooks on demand

prek run

Run all hooks against the entire repository:

prek run --all-files

Install git hooks

prek install

If you previously installed pre-commit hooks, reinstall once:

prek install -f

To uninstall:

prek uninstall

If installed via the standalone installer, prek can update itself:

prek self update

Commit Convention

We follow Conventional Commits specification:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code formatting changes
  • refactor: Code refactoring
  • test: Test-related changes
  • chore: Build process or auxiliary tool changes