stackblitz / core

Online IDE powered by Visual Studio Code ⚡️
https://stackblitz.com
MIT License
10.18k stars 885 forks source link

create repository assumes default branch is main #2986

Open airtonix opened 4 months ago

airtonix commented 4 months ago

my default branch in github is not main.

so I can never create a stackblitz project stored in github.

fvsch commented 3 months ago

Hi @airtonix.

Do you mean the default branch setting in https://github.com/settings/repositories?

A possible workaround is to create your repository on github.com directly (on https://github.com/new) and select at least one of the three options that will trigger creating this repository with a first commit and your configured default branch (instead of creating an empty repository):

Then you can work on that new repository on StackBlitz by opening it at:

https://stackblitz.com/~/github.com/{your_username}/{repository_name}

And StackBlitz will pull the repository’s default branch.

KwintenP commented 3 months ago

Could you provide some info on what url you specifically opened? If its a public repo and you are able to share, perfect. If not, that's also fine.

I tried to repro this but it seems to work on my end. See: https://stackblitz.com/github/kwintenp/non-main