Support Forums

How to creat a site so can use local dev but no git

So I want to locally locally dev a new code spike.

But I have to link it to a site first.
But it’s not in git and so after much searching if found drop zone hidden away at bottom of page :frowning:
But my code is in Windows WSL and I can’t drag and drop form the CLI :frowning:

Is there a way to get code into a site without git or GUI file explorer?

I guess I’ll just create a GitHub repo.

Hi @slim

Sounds like you are wanting to use Netlify CLI

I agree but I started using “netlify dev” in the cli. That is what insists I have a site and then all the problems follow.

As far as I know I cannot create a site with the cli from the folder I am in. The docs all point to creating sites with the ui and using git.

But yes, I’ll explore the cli more in case there’s an option I missed.

I used to just use netlify dev in any folder to fire up a web server. That was really nice. But now it appears I cannot. Or perhaps it’s as I have a netlify.toml in this case?

netlify init will create a site for you from the command line. Once you have that, you can use netlify dev to test your site locally (including functions) and netlify deploy to send your site live.

No need to push to git. Builds and done locally and pushed live.

1 Like

Ah does it!!
Generally init commands just set up a local directory structure.

I suggest:

“Configure continuous deployment for a new or existing site”
“Configure continuous deployment for a existing site or create a new site”

And possible add to GUI docs - though the CLI are not included there as options.

Thanks, will try

hold on - CI requires git integration and I was trying to just create the site as dev required me to link to one for local dev only.

It;'s all a little muddled IMHO

or perhaps it’s ME that is muddled - LOL

netlify init then you would select Yes, create and deploy site manually, select your team, enter a site name (or accept a random one) and that’s it.


It worked perfectly thanks and didn’t clobber the toml file as I feared it might.

So in summary the init command is great but the description in the online docs is confusing. It could say something like

Configure local build and dev to work in collaboration with a Netlify site if ione is not already linked. It will et up for manual deployment or CD with git and create and link to a new site in Netlify.

Yeah, it works perfectly. But the command name and online docs didn’t clue me in to what it does.

How about the build comment to use “link” also mention “init”?

Thanks very much


“Error: Could not find the site ID. Please run netlify link.”

Error: Could not find the site ID. Please run netlify link or netlify init."

Glad it all worked for you @slim. I’ll make sure to bring your suggestions Netlify staff for consideration.


Hey there @slim and @coelmay :wave:

Thanks so much for sharing this feedback! I have surfaced it to our Docs team for review.

1 Like