Link by git remote

vercel link --repo finds the project by remote, not by folder name.

From deploy-to-vercel, SKILL.md “Not linked + CLI is authenticated”.

A worktree has another name

Pick the local folder name, then press Link.

remote: github.com/acme/storefront
Match by folderBad
vercel link --scope acme
Match by remoteGood
vercel link --repo --scope acme
# Git remote: match the project that deploys this repo
vercel link --repo --scope <team-slug>   # writes .vercel/repo.json

# No remote: plain link, by directory
vercel link --scope <team-slug>          # writes .vercel/project.json

Why it matters, pros and cons

Why it matters

Plain link guesses from the folder name. Worktrees, clones and renames break that guess; the remote doesn't change.

Pros

  • Finds the project that already deploys this repo.
  • Keeps its env vars, domains and git deploys.
  • repo.json maps monorepo folders to projects.

Cons

  • Needs a git remote; without one, use plain link.
  • No project deploys this repo yet: nothing to match.