Missing "Master" Branch to Deploy

I’ve successfully connected my Bitbucket account to Netlify and am now trying to " Import an existing project from a Git repository." so I can try out a deployment. As soon as I get to the step “3. Site settings, and deploy!”, the “Owner” field is correct and preselected, but I can only select from old / deleted branches of my repository for the “Branch to deploy” field. I can’t see any active branches, or even master. I figured maybe it needed time to sync or something, but it’s been several days now. I’ve also repeatedly disconnected and reconnected Bitbucket to Netlify just in case, but still no luck.

What gives?

What site is this in relation to?

As if by magic, the “master” branch is now showing up. I really can’t explain this. It’s been missing for about a week but shows now randomly without explanation.

thanks for coming back and letting me know you found your solution!

I Have a similar issue. I can’t deploy the website as ‘Branch to Deploy’ is blank no matter which way I approach it. Does that mean I have to wait a week for it to appear before I can continue again? or is there another way to fix this?
Please help

@GranddadsFarm, your repo is empty: EarthWoodFlow/Minter_KnightGlide (github.com) there’s no branch.

I found the error. The Repo didn’t clone correctly. Now everything is working again.
Thanks for your help

Hiya,

I am replying to this 2 years later lol because I’m having this issue now. What do you mean the repo didn’t clone properly? I’m really confused at the moment because, I have opened my project in stackblitz, created a repository, which links to GitHub, went to netlify but my branch to deploy option is still blank. This is such a pain and I don’t understand why it simply does not import to netlify

Hi, @Zubair. What site is this about? Does the branch in question exist in the repo?

Hello Luke, thanks for the reply.

I simply created a repository on stackblitz, then once it was linked ith github, i imported the github project to netlify, but the branch to deploy option was not available for me for some reason.

in the attached photo is my code for the repository i imported to github from stackblitz, as you can see it says main.

Im not an expert on netlfiy/github/stackblitz so dont know what else to do

(attachments)

The screenshot shows that there’s no code in your repo and thus no branch. You need to add some code there first.

How do I create the code in stackblitz/github?

That’s not a Netlify question. There are several online resources available to answer it. However, GitHub is already telling you what you need to do: