#8584 c3 not initialising git properly
Not a bug - C3 correctly detects unconfigured git and skips init. Maintainer confirmed user's git lacked user.name/email config. Warning message via updateStatus() too subtle. Labeled error-messaging.
Improve warning visibility with color/box formatting and add actionable git config commands.
Analysis Report
Issue #8584: c3 not initialising git properly
Summary
| Field | Value |
|---|---|
| Issue | #8584 |
| Title | c3 not initialising git properly |
| State | OPEN |
| Created | 2025-03-19 |
| Updated | 2025-12-17 |
| Labels | bug, error-messaging |
| Reporter Version | C3 v2.41.2 |
| Current Version | C3 v2.62.3 |
Issue Description
User reports that when using npm create cloudflare@latest with the Hello World starters (Worker + Durable Objects variants), selecting "yes" to use git for version control does not result in a git repository being initialized. Running git status in the project directory shows "not a git repository."
Root Cause Identified
Per maintainer comment from @petebacondarwin (2025-03-31): The user's local git was not configured with username and email. C3 displays a warning when this happens, but the warning was not prominent enough and was missed by the user.
Current Code Behavior
Reviewed packages/create-cloudflare/src/git.ts:
- The
isGitConfigured()function checks forgit config user.nameandgit config user.email - If not configured, displays:
"Must configure 'user.name' and 'user.email' to use git. Continuing without git." - This is output via
updateStatus()which may not be visually prominent enough
Recommendation
Keep Open - This is a valid enhancement request to improve error messaging.
Rationale:
- Not a bug per se - C3 correctly detects unconfigured git and skips initialization
- Valid UX improvement - The warning message should be more prominent/visible
- Confirmed by maintainer - @petebacondarwin acknowledged the warning should be "more obvious"
- Properly labeled - The
error-messaginglabel indicates this is tracked as a messaging improvement - No fix has been merged - No commits to
git.tssince the issue was opened that address the warning visibility
Suggested Fix:
The warning could be enhanced to:
- Use a more visually distinct format (e.g., warning box, color highlighting)
- Include actionable instructions on how to configure git:
git config --global user.name "Your Name" git config --global user.email "your.email@example.com"
Related Items
- No PRs found directly addressing this issue
- Issue is in backlog for error messaging improvements
Conclusion
This issue should remain OPEN as a valid enhancement request. The underlying functionality works correctly, but user experience can be improved by making the git configuration warning more prominent and actionable.
Notes & Feedback (0)
No notes yet.