Moved to new repository, but admin page is still using the old one

The site I am working on is published at and I had to change the repository where the content is managed.

Now when I visit the netlify CMS at /admin, it publishes to the old repository. Is there anything I forgot to change?

Hi @brunoamaral

Have you linked the new repository to the site?

@coelmay I believe I did, when I changed the repository in the administration side of netlify.

Wondering if @tomrutgers might have a solution?

Clear your localStorage, to begin with. Have you specified your repo in config.yml? If so: change it

I tried with an incognito window and clearing the storage. I get an error saying branch not found, and my config.yaml is pretty barebons, with the following and a couple of collections:

  name: git-gateway
  branch: main # Branch to update (optional; defaults to master)

media_folder: "static/images/uploads" # Media files will be stored in the repo under static/images/uploads
public_folder: "/images/uploads" # The src attribute for uploaded media will begin with /images/uploads

Could you try to delete your Git Gateway instance from Identity settings and create it again?

just tried that and also tried to unlink and link the repository. Didn’t work and I get a ‘branch not found’ message on /admin

This might be a silly question but does the main branch exist at all?

it’s not a silly question, given that this website is prior to github renaming default branches from “master” to “main”.

It does exist, there are only two branches in this repository, main and stage.

given that this website is prior to github renaming default branches from “master” to “main”.

Yeah, that was my main concern. It feels like a stupid question if it was created after, though :slight_smile:

Just for the sake of trying: Can you set up a new site with the same repo and see if that works?