Use the `ft` (feature-tree) CLI to run worktree-per-branch Git workflows in bare-in-`.git` repositories. Covers clone/bootstrap, worktree listing, worktree switch/create/remove, PR checkout, include-manifest sync, squash, and shell integration. Use when the user mentions `ft`, feature-tree, or managing Git worktrees in this layout.
ft) skillUse this skill when a task is about the ft CLI in this repository.
ft manages one worktree per branch in a bare-in-.git repo layout:
repo/
.git/ # bare common git dir
main/ # default-branch worktree
my-feature/ # feature branch worktree
ft from inside a worktree in a bare-in-.git repo.^ = default branch@ = current branch (unavailable on detached HEAD)eval "$(ft init zsh)" (or bash)ft clone <url> [dir]dir/.git as a bare repo and creates the first worktree for the detected default branch.dir is omitted, it is inferred from the repo URL.origin/HEAD and branch tracking so later git pull in worktrees works.cd hint.ft list@ = current branch worktree^ = default branch worktreeSTATE values:
clean or dirty with symbols+ staged, ! unstaged, ? untracked (combined when multiple apply)RELATION is relative to default branch:
A: <n> commits aheadB: <n> commits behindft switch [branch]branch, opens an interactive picker (TTY required).--create is used.-c, --create: create missing worktree while switching-b, --base <branch>: base branch used with --createft create [branch]branch.Already exists.-b, --base <branch>: base branch for new branch creation-a, --all-branches: when branch is omitted, open picker that includes local branches without worktrees (TTY required)ft pr <num>origin and creates/switches to worktree branch pull/<num>.ft copy-include [--from <branch>] [--to <branch>].worktreeinclude patterns from one worktree to another.--from: default branch--to: current branch^, @).# comments are ignored/ in patterns is ignoredft squash [--base <branch>]ft remove [branch]branch omitted:
-f, --force-worktree (or --force): remove even if dirty/unpushed safeguards fail-D, --force-branch: force-delete branch--no-delete-branch: remove worktree only, keep branchft init [bash|zsh]cd after ft switch, ft create, and ft pr.ft init <shell> directly to .bashrc/.zshrc:eval "$(ft init zsh)"
ft binaries cannot change parent shell cwd directly; wrapper handles the __FT_CD__= marker.ft completion [bash|zsh]ft completion zsh > ~/.ft-completion.zsh
source ~/.ft-completion.zsh
ft clone https://github.com/org/repo.git
cd repo/main
eval "$(ft init zsh)"
ft create feat/my-change
ft switch # picker
ft switch my-branch # direct
ft remove my-branch
only bare-in-.git repositories are supported
ft clone.could not determine default branch
git --git-dir=.git remote set-head origin --auto.HEAD is detached / @ is unavailable
@ on detached HEAD.no interactive TTY available