Linking to local git repository

Hi,

Could you add the option to deploy from a locally created git repository (in addition to github, gitlab, and bitbucket)?

It’s already available :slight_smile:
Check out this documentation with more details:

You have to set up with our CLI rather than our UI, but it does work already.

The UI is awesome, but the CLI offers the flexibility I am looking for. Thanks! The ‘link’ and ‘unlink’ commands are really valuable if you want to ‘deploy’ from a newly created local repository.

1 Like

I would also like to push files from my local repo directly to Netlify. If I run the command netlify init --manual it doesn’t promt me for my deploy settings and doesn’t provide me with two items as your docs mention. Instead, I get the warning “No git remote was found…”. And it’s true, but how can I specify my local repo?

Hi @sergii,

Each Git repo needs to have a remote, correct? I don’t see any benefit if you keep the repo “locally” that’s not on any remote host.

The CLI feature mentioned above needs to have some remote configured for your repo.

The original poster wrote about “the option to deploy from a locally created git repository (in addition to github, gitlab, and bitbucket)”. That is “to deploy not from a remote cloud Git, but directly from a local repo”. Or “can we use Netlify not just a final hosting, but also as remote Git, all-in-one”.

hey there @sergii,

I think I understand what you are trying to do (deploy directly from local - skip the need to have a remote repo anywhere) but this represents a really fundamental shift in how our software works.

We might consider doing this someday, but I think unless we can see a compelling use case, it might be a tough sell. Can you outline what you see as the core advantage or what your particular use case would be?

As always, thanks for bringing ideas and thoughts to us!

My case is so thin and individual that I can’t talk about. But your company may consider the idea to make it possible to get acquainted with, configure, use and pay for just your one service as both remote Git and the final hosting, all-in-one. It may be useful at least for the new developers and teams who yet have no an account at Github.

thanks for sharing that, @sergii - i am not sure if we will end up going this route, but if we do, we will definitely let you know!