You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
create-react-router aborts scaffolding when the optional initial Git commit fails #15735
When create-react-router initializes Git, it runs:
git init
git add .
git commit -m "Initial commit from create-react-router"
These commands are handled as one operation. If the optional initial commit fails, for example because user.name and user.email are not configured, the CLI reports:
Oh no! Failed to initialize git.
and exits with an error.
At that point, the project files, .git directory, and staged files already exist. Only the initial commit has failed.
Project scaffolding should complete when git init and git add succeed, even if the optional initial commit fails.
The CLI should report that Git was initialized but the initial commit could not be created, ideally with guidance to configure user.name and user.email.
Actual Behavior
The CLI reports Oh no! Failed to initialize git. and exits unsuccessfully, even though the repository was initialized and files were staged.
Activity
chbaefront commentedon Nov 5, 2026
Someone hijacked my issue and opened a PR first. 🤣🤣