Appearance
Quick Start
This guide walks you through the core daft workflow: cloning a repo, creating branches, and cleaning up.
1. Clone a Repository
bash
daft clone git@github.com:user/my-project.gitThis creates a structured layout:
my-project/
├── .git/ # Shared Git metadata
└── main/ # Worktree for the default branch
└── ... (project files)You're automatically placed in my-project/main/.
This shows the contained layout. daft supports other layouts that
organize worktrees differently — see Layouts to explore your options. :::
2. Create a Feature Branch
From anywhere inside the repository:
bash
daft start feature/authThis creates a new branch and worktree in one step:
my-project/
├── .git/
├── main/ # Default branch (untouched)
└── feature/auth/ # New branch with its own worktree
└── ... (project files)You're now in my-project/feature/auth/. Your main/ directory is completely untouched.
3. Switch Between Branches
Each branch is just a directory. Open different terminals:
bash
# Terminal 1 - working on feature
cd my-project/feature/auth/
npm run dev
# Terminal 2 - checking main
cd my-project/main/
npm testTo check out an existing branch:
bash
daft go bugfix/login-issue4. Branch From Default
When you need a fresh branch from main (regardless of where you are), use the gwtcbm shortcut from shell integration:
bash
daft start hotfix/critical-fix main
# Or with the gwtcbm shortcut (from shell integration)
gwtcbm hotfix/critical-fixYour directory structure becomes:
my-project/
├── .git/
├── main/
├── feature/auth/
├── bugfix/login-issue/
└── hotfix/critical-fix/ # Branched from main, not current branch5. Carry Changes Between Worktrees
Move uncommitted work to another worktree:
bash
# Move changes from current worktree to feature/auth
daft carry feature/auth
# Or copy changes (keep them in both places)
daft carry --copy feature/auth main6. Clean Up Merged Branches
After branches are merged and deleted on the remote:
bash
daft pruneThis automatically:
- Fetches from remote and prunes stale tracking branches
- Identifies local branches whose remotes were deleted
- Removes associated worktrees
- Deletes local branches
7. Adopt an Existing Repository
Already have a traditional repository? Convert it:
bash
cd my-existing-project
daft adoptThis restructures your repo into the worktree layout. Uncommitted changes are preserved.
Git-native commands Every daft command has a git-native equivalent
(e.g., daft clone = git worktree-clone). See the CLI Reference for the full list. :::
What's Next
- Shell Integration - Enable auto-cd into new worktrees
- Layouts - Choose how worktrees are organized on disk
- Worktree Workflow - Deep dive into the worktree-centric approach
- Hooks - Automate worktree lifecycle events
- Shortcuts - Enable short command aliases
- Configuration - Customize daft's behavior