Skip to content

feat: add gtr.nextStep configuration for custom next steps #49

@damianlewis

Description

@damianlewis

Feature Request

Problem

After creating a worktree, gtr displays helpful "Next steps" like:

Next steps:
  cd /path/to/worktree
  git gtr editor feature-branch

However, users cannot add project-specific next steps (e.g., npm install, cp .env.example .env).

While postCreate hooks exist, their output appears before the "Next steps" section, making it less visible and disconnected from the workflow guidance.

Proposed Solution

Add gtr.nextStep multi-valued configuration option to display custom next steps alongside the built-in ones:

git gtr config add gtr.nextStep "npm install  # Install dependencies"
git gtr config add gtr.nextStep "cp .env.example .env  # Setup environment"

Output after creating worktree:

Next steps:
  cd /path/to/worktree
  git gtr editor feature-branch
  npm install  # Install dependencies
  cp .env.example .env  # Setup environment

Benefits

  • Custom steps appear in the logical place (with other next steps)
  • Supports variable substitution ($BRANCH, $WORKTREE_PATH)
  • Can be shared via .gtrconfig for team consistency

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions