with one click
git-worktree
// Create and manage git worktrees for parallel development and testing
// Create and manage git worktrees for parallel development and testing
Full release lifecycle for Kagenti ā alpha, RC iteration loop, GA, and patch releases with multi-repo coordination
TDD iteration loop across 4 environments (local Kind, custom HyperShift, CI Kind, CI HyperShift) with test matrix tracking and log analysis
Deploy and manage Kagenti operator, agents, and tools on Kubernetes. Handles installer, CRDs, pipelines, and demo deployments.
Deploy the weather agent and MCP tool demo via CLI (no UI required). Uses pre-built ghcr.io images, deploys to team1. Optimized for speed (~15s).
Manage Kind clusters for local Kagenti testing. Create, destroy, deploy platform, and run E2E tests.
Run full end-to-end test workflows for Kagenti. Supports Kind and HyperShift clusters with automated setup and testing.
| name | git:worktree |
| description | Create and manage git worktrees for parallel development and testing |
Manage git worktrees for parallel development workflows.
# New branch from main
git worktree add .worktrees/<name> -b <branch-name> main
# Existing branch
git worktree add .worktrees/<name> <existing-branch>
# Specific commit
git worktree add .worktrees/<name> <commit-sha>
git worktree list
# Normal remove
git worktree remove .worktrees/<name>
# Force remove (discards changes)
git worktree remove --force .worktrees/<name>
# Prune stale references
git worktree prune
# Create worktree for new feature
git worktree add .worktrees/feature-auth -b feature-auth main
cd .worktrees/feature-auth
# Make changes, commit, push
git add .
git commit -m "Add auth feature"
git push -u origin feature-auth
# Source environment
source ~/.kagenti-hypershift-env.sh
# Deploy from worktree to cluster
KUBECONFIG=$HOSTED_KUBECONFIG scripts/ocp/setup-kagenti.sh
# Or use local-setup scripts
./.github/scripts/local-setup/kind-full-test.sh --skip-cluster-destroy
# Return to main
cd /path/to/main/repo
# Remove worktree
git worktree remove .worktrees/feature-auth
# Delete branch if merged
git branch -d feature-auth
Keep worktrees organized:
kagenti/ # Main worktree (main branch)
āāā .worktrees/ # Feature worktrees
ā āāā feature-auth/ # Auth feature
ā āāā fix-keycloak/ # Bug fix
ā āāā pr-review-123/ # PR review
āāā ...
Add to .git/info/exclude:
.worktrees/
Point worktree work to a TODO document in the main repo:
# Create worktree for TODO item
git worktree add .worktrees/todo-phoenix -b todo-phoenix main
cd .worktrees/todo-phoenix
# Reference TODO from main repo
cat /path/to/main/repo/docs/TODO_PHOENIX.md
# Implement based on TODO
# ...
# Test deployment
./.github/scripts/local-setup/hypershift-full-test.sh --skip-cluster-destroy
Test worktree code on HyperShift clusters:
# Create worktree
git worktree add .worktrees/my-feature -b my-feature main
cd .worktrees/my-feature
# Source environment (shared kubeconfig)
source ~/.kagenti-hypershift-env.sh
# Deploy to existing cluster
KUBECONFIG=$HOSTED_KUBECONFIG scripts/ocp/setup-kagenti.sh
# Or create new cluster with this code
./.github/scripts/local-setup/hypershift-full-test.sh --skip-cluster-destroy
Test worktree code on local Kind cluster:
# Create worktree
git worktree add .worktrees/my-feature -b my-feature main
cd .worktrees/my-feature
# Full test cycle
./.github/scripts/local-setup/kind-full-test.sh --skip-cluster-destroy
# Access UI
./.github/scripts/kind/access-ui.sh
feature-auth, fix-keycloak, pr-123$HOME, not in worktreegit worktree prune periodically# Find which worktree has the branch
git worktree list | grep <branch-name>
# Remove existing worktree
git worktree remove .worktrees/<name>
# Or force if changes exist
git worktree remove --force .worktrees/<name>
# Prune after manually deleting worktree directories
git worktree prune