Skip to content

feat: Providing options for initializing git repo on project creation - #2620

Open
nishu-murmu wants to merge 18 commits into
mainfrom
fix/git-init
Open

nishu-murmu wants to merge 18 commits into
mainfrom
fix/git-init

Conversation

@nishu-murmu

@nishu-murmu nishu-murmu commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

On commands.ts file added new funtionality for initializing the git after the project is cloned.

Manual Testing

  1. cd into packages/wxt.
  2. create a project using bun wxt init (git the directory name test so it wont conflict).
  3. Check got git repo using git status

Related Issue

This PR closes #2603

@netlify

netlify Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit 968c82d
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6ac9cff4947b9f00089e0ad1
😎 Deploy Preview https://deploy-preview-2620--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions Bot added the pkg/wxt Includes changes to the `packages/wxt` directory label Sep 12, 2026
@nishu-murmu
nishu-murmu enabled auto-merge (squash) September 12, 2026 15:44
@pkg-pr-new

pkg-pr-new Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2620

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2620

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2620

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2620

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2620

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2620

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2620

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2620

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2620

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2620

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2620

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2620

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2620

wxt

npm i https://pkg.pr.new/wxt@2620

commit: 968c82d

@codecov

codecov Bot commented Sep 12, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.65%. Comparing base (cd40f16) to head (968c82d).

Files with missing lines Patch % Lines
packages/wxt/src/initialize.ts 0.00% 7 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2620      +/-   ##
==========================================
- Coverage   79.71%   79.65%   -0.07%     
==========================================
  Files         138      138              
  Lines        4111     4118       +7     
  Branches      943      946       +3     
==========================================
+ Hits         3277     3280       +3     
- Misses        736      739       +3     
- Partials       98       99       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread packages/wxt/src/core/initialize.ts Outdated
Co-authored-by: fkatsuhiro <113022468+fkatsuhiro@users.noreply.github.com>

@fkatsuhiro fkatsuhiro left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thank you.

@coderabbitai

coderabbitai Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1843d53f-4e9d-4aa1-82d0-70dc38008be1

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nishu-murmu

Copy link
Copy Markdown
Collaborator Author

@PatrykKuniczak can you review this?

@aklinker1 aklinker1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most init commands don't setup a git repo. What if the computer doesn't have git installed? What if they use a different vcs? Can you provide more details on why you want to add this? Can you point to other packges/frameworks that do create a git repo without asking?

@nishu-murmu

nishu-murmu commented Oct 5, 2026 •

Copy link
Copy Markdown
Collaborator Author

Lot of popular frameworks like
Next.js, Angular, Nestjs, Remix, Astro, Svelte, Nuxt, Gatsby does provide default git init
But I checked that vite doesn't provide that, as this framework also align a lot with vite

I don't know, I tried using WXT after a while and suddenly noticed this
@PatrykKuniczak can you let me know your thoughts?

And people using WXT framework, which requires things like npm and all, it's hardly unlikely that git won't be in the system (we can show a warning while implementing this feature??)

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@PatrykKuniczak can you let me know your thoughts?

Yeah, it's standard also in new projects created via JetBrains IDE.

I think good idea is skip init when git isn't present.

@fkatsuhiro

Copy link
Copy Markdown
Contributor

Can you point to other packges/frameworks that do create a git repo without asking?

Ahh, I see.
In Astro js is asking this comment during init command.
image

And in astro, during create astro command, following question ask to user.
image

In WXT, how about adding a question to ask whether to initialize a git after asking 'packages manager'?

@nishu-murmu

Copy link
Copy Markdown
Collaborator Author

@PatrykKuniczak @aklinker1 Implemented this new feature, where we're asking whether you want to initialize git repo or not?
User can opt in or out of it.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@PatrykKuniczak @aklinker1 Implemented this new feature, where we're asking whether you want to initialize git repo or not?
User can opt in or out of it.

Yeah, let's do it.

@nishu-murmu

Copy link
Copy Markdown
Collaborator Author

@PatrykKuniczak @aklinker1 Implemented this new feature, where we're asking whether you want to initialize git repo or not?
User can opt in or out of it.

Yeah, let's do it.

I was saying I've already implemented it, Please review it 😓

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@PatrykKuniczak @aklinker1 Implemented this new feature, where we're asking whether you want to initialize git repo or not?
User can opt in or out of it.

Yeah, let's do it.

I was saying I've already implemented it, Please review it 😓

I understood it, you want to implement it. Because you've placed "?" at the end.

I'll take a look on that on free time, because i'm in work right now.

Comment thread packages/wxt/src/initialize.ts Outdated
@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

@nishu-murmu Don't use "fix" in title, if you're adding new feature.

@PatrykKuniczak

Copy link
Copy Markdown
Collaborator

Why theres a {{version}} for bun wxt init but no for wxt init?
image

@nishu-murmu nishu-murmu changed the title fix: Initializing git repo on project creation feat: Providing options for initializing git repo on project creation Oct 9, 2026
nishu-murmu and others added 2 commits October 9, 2026 11:05
Co-authored-by: Patryk Kuniczak <p.kuniczak@gmail.com>
@nishu-murmu

Copy link
Copy Markdown
Collaborator Author

Why theres a {{version}} for bun wxt init but no for wxt init? image

I don't see this! And it has nothing do with my feature implementation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/wxt Includes changes to the `packages/wxt` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

git is not initialized during creating a project in WSL.

4 participants