Vercel CLI deployments fail to match git branch in git worktrees

Problem

I was trying to create deploy previews locally using the Vercel CLI in a git worktree, but ran into an issue where the preview wouldn’t link to a git branch environment.

Solution

After looking at the code, I found the culprit and fixed it in this PR: fix(cli): resolve git config path for worktrees by PaytonWebber · Pull Request #15273 · vercel/vercel · GitHub.

It follows the same pattern already merged in Fix vc link --repo in git worktree by TooTallNate · Pull Request #14867 · vercel/vercel · GitHub.

Thank you for your contributions, Payton! :slight_smile:

1 Like