Skip to content

fix: Don't delete existing .git when using --no-git flag#12968

Merged
anthonyshew merged 1 commit into
mainfrom
shew/investigate-12967
May 28, 2026
Merged

fix: Don't delete existing .git when using --no-git flag#12968
anthonyshew merged 1 commit into
mainfrom
shew/investigate-12967

Conversation

@anthonyshew

@anthonyshew anthonyshew commented May 28, 2026

Copy link
Copy Markdown
Contributor

Why

Closes #12967. Users who pass --no-git expect create-turbo to leave git alone, not initialize a repo or delete an existing .git directory.

What

Stops the --no-git path from doing any git work and removes the now-unused .git deletion helper.

How

Adds coverage that --no-git does not call the git init helper or spawn git commands, while preserving normal git initialization when the flag is not used.

Verified with:

  • pnpm --filter create-turbo test -- --runTestsByPath __tests__/git.test.ts __tests__/index.test.ts
  • pnpm --filter create-turbo check-types

@anthonyshew anthonyshew requested a review from a team as a code owner May 28, 2026 12:26
@anthonyshew anthonyshew requested review from tknickman and removed request for a team May 28, 2026 12:26
@vercel

vercel Bot commented May 28, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples-basic-web Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-designsystem-docs Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-gatsby-web Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-kitchensink-blog Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-nonmonorepo Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-svelte-web Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-tailwind-web Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
examples-vite-web Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm
turbo-site Ready Ready Preview, Comment, Open in v0 May 28, 2026 12:27pm

@anthonyshew anthonyshew changed the title fix: Respect create-turbo no-git flag fix: Don't delete existing .git when using --no-git flag May 28, 2026
@anthonyshew anthonyshew merged commit b4aa626 into main May 28, 2026
43 checks passed
@anthonyshew anthonyshew deleted the shew/investigate-12967 branch May 28, 2026 12:35
anthonyshew pushed a commit that referenced this pull request May 28, 2026
## Release v2.9.16

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/26579906777)

### Changes

- release(turborepo): 2.9.15 (#12955) (`c85d410`)
- fix: Avoid hanging PTY shutdown (#12958) (`52e81bd`)
- fix: Retry npm tlog publish failures (#12959) (`5317f65`)
- release(turborepo): 2.9.16-canary.1 (#12960) (`2284fa9`)
- fix: Preserve nested Bun dependency versions (#12963) (`8d4eaf8`)
- Revert "fix: Preserve nested Bun dependency versions" (#12964)
(`3b1b6e9`)
- release(turborepo): 2.9.16-canary.2 (#12961) (`5e5b248`)
- fix: Preserve nested Bun dependency versions (#12965) (`7952b46`)
- fix: Don't delete existing `.git` when using `--no-git` flag (#12968)
(`b4aa626`)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
anthonyshew pushed a commit that referenced this pull request May 28, 2026
## Release v2.9.17-canary.1

> [!CAUTION]
> Versioned docs aliasing FAILED. [View
logs](https://github.com/vercel/turborepo/actions/runs/26586129373)

### Changes

- fix: Preserve nested Bun dependency versions (#12963) (`8d4eaf8`)
- Revert "fix: Preserve nested Bun dependency versions" (#12964)
(`3b1b6e9`)
- release(turborepo): 2.9.16-canary.2 (#12961) (`5e5b248`)
- fix: Preserve nested Bun dependency versions (#12965) (`7952b46`)
- fix: Don't delete existing `.git` when using `--no-git` flag (#12968)
(`b4aa626`)
- fix: Keep non-PTY stdin alive for persistent tasks (#12972)
(`26ae68b`)
- release(turborepo): 2.9.16 (#12970) (`fac2b75`)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

create-turbo with --no-git can DELETE the .git directory

1 participant