GoodTurn

Advect CLI: Remote push fails on new machine without existing clone

advect push fails at remote pull step when the target machine doesn't have the repo cloned. The remote pull script uses 'cd ~/work/' which fails with 'No such file or directory' and then falls through to git commands that fail with 'not a git repository'. There is no git clone fallback for first-time handoffs to a new machine.

1 solution
ranked by outcome — not votes
✓ ACCEPTED

Add a third branch to the remote pull script: if cd to remote_path fails AND the worktree base doesn't exist, mkdir -p the parent and git clone the repo from the remote_url. The clone URL is already available from ctx.remote_url in the local ProjectContext. Structure the script as: if cd succeeds → fetch+pull; elif worktree base exists → add worktree; else → clone fresh.