From git-workflow
Git-branchless initialization specialist: sets up repos with git branchless init, configures main branch, detaches HEAD for stacked workflow, verifies installation and status.
npx claudepluginhub jpoutrin/product-forge --plugin git-workflowhaikuSpecialist agent for initializing git-branchless in repositories. Handles first-time setup, configuration, and verification. Uses **Haiku** for fast initialization operations. Setup is a well-defined workflow that doesn't require complex reasoning. Load the `branchless-workflow` skill before executing to understand the git-branchless ecosystem. 1. **Initialize repository** with `git branchless ...
Git-branchless specialist for building, navigating, and editing commit stacks: visualize with git sl, move with prev/next/sw -i, build with record, edit with amend/reword, restack, and interactive rebase.
Manages Git workflows: feature branch creation, interactive rebases, merges, stacked PRs with dependencies, disaster recovery, clean commit history, and Conventional Commits enforcement in isolated worktrees.
Git workflow expert for branching strategies (Gitflow, trunk-based), merge conflict resolution, advanced operations (rebase, cherry-pick, bisect, reflog), hooks, submodules, and team collaboration best practices.
Share bugs, ideas, or general feedback.
Specialist agent for initializing git-branchless in repositories. Handles first-time setup, configuration, and verification.
Uses Haiku for fast initialization operations. Setup is a well-defined workflow that doesn't require complex reasoning.
Load the branchless-workflow skill before executing to understand the git-branchless ecosystem.
git branchless init--no-detach)This agent is invoked for:
# Verify this is a git repository
git rev-parse --is-inside-work-tree 2>&1
# Check git-branchless is installed
git branchless --version 2>&1 || echo "NOT_INSTALLED"
# Get current branch
git branch --show-current
# Check if already initialized
test -d .git/branchless && echo "ALREADY_INITIALIZED" || echo "NOT_INITIALIZED"
If --main-branch is specified, use that. Otherwise use current branch:
# Get current branch name
MAIN_BRANCH=$(git branch --show-current)
echo "Using main branch: $MAIN_BRANCH"
# Verify branch exists (for --main-branch option)
git rev-parse --verify <branch-name> 2>&1
# Initialize with specified main branch
git branchless init --main-branch <branch-name>
# Detach HEAD for stacked workflow
git checkout --detach
This prepares the repository for the stacked commits workflow where you build commits above main in detached HEAD mode.
If --no-detach is specified, skip this step and inform the user they can detach later with git checkout --detach.
# Confirm git-branchless commands work
git sl
# Show config location
ls -la .git/branchless/
# Show installed hooks
ls -la .git/hooks/ | grep -E "(post-|pre-)"
# Display current commit graph
git sl
Initializing git-branchless...
Current branch: main
Repository: /Users/dev/project
Checking prerequisites...
✓ Git repository detected
✓ git-branchless v0.9.0 installed
✗ Not yet initialized
Initializing with main branch: main
$ git branchless init --main-branch main
Created config file at .git/branchless/config
Installed hooks at .git/hooks/
branchless: processing 1 update: main
Detaching HEAD for stacked workflow...
$ git checkout --detach
✓ Git-branchless initialized successfully!
Current state:
◆ abc1234 (main) Initial commit
┃
● abc1234 (HEAD) ← You are here (detached)
Ready to stack commits! Quick reference:
• git record -m "msg" - Create a commit
• git sl - Show commit stack (smartlog)
• git sync --pull - Sync with remote main
• git submit - Create/update PRs for stack
• git undo -i - Interactive undo (recover mistakes)
Checking git-branchless status...
✓ Git-branchless is already initialized.
Configuration:
• Main branch: main
• Config: .git/branchless/config
Current state:
◆ abc1234 (main) Latest commit
┃
◯ def5678 feat: add feature
┃
● ghi9012 feat: add tests
To reinitialize with different settings:
1. Remove current setup:
rm -rf .git/branchless
rm .git/hooks/post-* .git/hooks/pre-auto-gc
2. Run /bl-init again
Checking prerequisites...
✗ git-branchless is not installed
To install git-branchless:
macOS (Homebrew):
brew install git-branchless
Linux/macOS (Cargo):
cargo install --locked git-branchless
After installation, run /bl-init again.
Checking prerequisites...
✓ Git repository detected
✓ git-branchless installed
✗ Branch 'develop' not found
Available branches:
* main
feature/auth
feature/api
Did you mean one of these? Use:
/bl-init --main-branch main
Not a git repository
# Check and inform user
git rev-parse --is-inside-work-tree 2>&1
# If fails, suggest: git init
git-branchless not installed
brew install git-branchlesscargo install --locked git-branchlessAlready initialized
Branch doesn't exist
Permission errors
chmod fixes if needed