Skip to content

Proposal: Initialize a git repository and create an initial commit on scaffold #1483

@ryohidaka

Description

@ryohidaka

Description

When scaffolding a new project with vp create, there is no built-in way to
initialize a git repository.
Users need to manually run git init and
git add -A && git commit -m "Initial commit" after scaffolding, which is
a common step in every new project setup.

Adding a flag (e.g. --git) would streamline the project creation flow and bring
vp create in line with other popular scaffolding tools (e.g. create-next-app,
nuxt init) that offer git initialization out of the box.

Suggested solution

Add a --git / --no-git flag to vp create.

  • In interactive mode, prompt the user with a confirm dialog (default: No)
  • In non-interactive mode, default to skipping git initialization
  • When enabled, run git init before installing dependencies,
    then git add -A && git commit -m "Initial commit from Vite+" after formatting completes

API:
vp create vite:application --git # always initialize
vp create vite:application --no-git # always skip

Alternative

No response

Additional context

No response

Validations

  • Read the Contributing Guidelines.
  • Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
  • Check that there isn't already an issue requesting the same feature.

Metadata

Metadata

Assignees

No one assigned

    Priority

    None yet

    Start date

    None yet

    Target date

    None yet

    Effort

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions