Hi all. I’ve been trying to figure this out for quite a while, without success:
Is it possible to use the “Deploy To Netlify” button with a repository that has a “main” instead of “master” branch? I’ve been pouring over the docs for the toml file and the “deploy to netlify” button, and I’m just not having any luck at all.
Could somebody point me to an example repository that works with a “deploy to netlify” button, but with a non-“master” default branch? Thanks!
You’d need to update that setting in our UI, or via API. By far easier in UI, on your deploy settings page!
As far as I know, there is no way to create a deploy to netlify button that doesn’t use master, but I’ve asked the team for some advice and will let you know what I find out!
Thanks for your response! It’d be great if it could be handled via the button or the
netlify.toml, but we’ll just work around it for the time being. At least I know I was having trouble because it wasn’t actually possible
we should have an update for you soon - stay tuned.
we have merged a change that no longer requires a branch to be called “master” to be valid, which we’re all pretty stoked about over here - words matter! Let us know if you have any further questions
Oh, awesome. Are there any docs, or will it just automatically use the default branch without any additional configuration?
from my understanding of reading through the PR notes just now, it should “just work” with the default branch, regardless of what its called. let us know if you run into anything unexpected with this!