Skip to main content

Git Integration

Link git branches to tasks for better tracking and automatic status updates.

Branch Naming Convention

The CLI recognizes branches that include a task ID:

# These all link to MYAPP-123:
git checkout -b MYAPP-123-implement-auth
git checkout -b feature/MYAPP-123-auth
git checkout -b MYAPP-123

Starting Work on a Task

Create a branch for a task automatically:

erold task start MYAPP-123

# Creates branch: MYAPP-123-implement-auth
# Sets task status to: in_progress

Options:

# Custom branch name
erold task start MYAPP-123 --branch feature/auth

# Don't change task status
erold task start MYAPP-123 --no-status

Finishing a Task

Mark a task as done from the current branch:

erold task finish

# If on branch MYAPP-123-implement-auth:
# - Sets MYAPP-123 status to: done
# - Optionally creates PR

Commit Messages

Include the task ID in commit messages for linking:

git commit -m "MYAPP-123: Add login endpoint"

# Or use the CLI helper:
yet commit "Add login endpoint"
# Automatically prepends: MYAPP-123: Add login endpoint

Automatic Status Updates

Set up git hooks to automatically update task status:

erold git hooks install

# Installs hooks that:
# - Set task to in_progress when branch created
# - Add commit references to task
# - Optionally set to done on merge

PR Integration

Create a pull request linked to the task:

erold pr create

# Creates PR with:
# - Title from task
# - Link to task in description
# - Task ID in PR body

Git Hooks Configuration

Configure hook behavior in .yet/config.json:

{
  "git": {
    "autoStatus": true,
    "branchPrefix": "feature/",
    "commitPrefix": true,
    "doneOnMerge": true
  }
}
Option Description
autoStatus Auto-update task status on branch events
branchPrefix Prefix for generated branch names
commitPrefix Auto-add task ID to commits
doneOnMerge Set task to done when PR merged

Viewing Linked Activity

See git activity for a task:

erold task show MYAPP-123 --git

# Shows:
# - Linked branches
# - Commits mentioning task
# - Pull requests

Example Workflow

# 1. Pick up a task
erold task list --status todo
erold task start MYAPP-123

# 2. Work on it, commit
git add .
yet commit "Add login form"

# 3. More work...
git add .
yet commit "Add validation"

# 4. Finish and create PR
erold task finish
yet pr create

# 5. After PR merged, task auto-completes (if configured)

Next Steps