Git Workflow

Use when committing and pushing code changes, ensures DCO compliance and pre-commit validation

zilliztech f9dec4a 1.3 KB Updated

File contents

Git Workflow

Before Committing

Always run pre-commit validation:

# Validate specific files
pre-commit run --files <changed-files>

# Or validate all staged files
pre-commit run

Fix any issues before proceeding.

DCO (Developer Certificate of Origin)

All commits must include a Signed-off-by line for DCO compliance:

git commit -s -m "commit message"

Or add manually:

Signed-off-by: Your Name <your.email@example.com>

Commit Workflow

  1. Stage changes

    git add <files>
    
  2. Run pre-commit

    pre-commit run
    
  3. Fix any issues and re-stage if needed

  4. Commit with DCO sign-off

    git commit -s -m "type: description"
    

Commit Message Format

type: short description

Optional longer description.

Signed-off-by: Name <email>

Types: feat, fix, docs, refactor, test, chore

Push

git push origin <branch>

Quick Reference

Task Command
Pre-commit check pre-commit run
Commit with DCO git commit -s -m "message"
Amend with DCO git commit --amend -s
Push git push origin <branch>

zilliztech/knowhere/tree/main/.claude/skills/git-workflow commit f9dec4af90

Frequently asked questions

npx skillmds@latest add zilliztech/git-workflow