Skip to content

Git worktree projects

Milimarty edited this page Oct 19, 2026 · 1 revision

Git worktree projects

A git worktree (or a submodule) has a .git file, not a folder: it points to its repository's git folder somewhere else. Inside keel's container that path did not exist, so git said "not a git repository".

 ~/Projects/shop/.git/                  ← the repository's git folder
 ~/Projects/shop-feature/.git (a file)  → "gitdir: ~/Projects/shop/.git/worktrees/shop-feature"
        │
 keel2 start / add ─ mounts both, at the same path as on your computer ─ git works in the container
  • From 0.18.17, keel2 start and keel2 add also mount the repository's git folder, at the same path. keel2 says so: "… is a git worktree or submodule: its repository … is mounted too".
  • Get the new keel2 script for this (curl -fsSL https://raw.githubusercontent.com/MiladNalbandi/keel-v2/main/install.sh | bash), then keel2 restart.
  • When keel still cannot see the repository, the message says which folder keel checked, what git said (a folder keel cannot see, git's "dubious ownership"…) and the fix.
  • Native mode needs nothing: keel runs on your computer and sees every path.

From docs/GUIDE.md · All pages

Clone this wiki locally