Template not found on main branch
I can see you're having an issue with a template not being on the main branch, but your question doesn't include enough context for me to give you a specific answer. However, this is a common issue with Sanity templates and GitHub repositories, so let me cover the most likely scenarios:
Common Causes & Solutions:
Template Branch Structure: Many Sanity templates and starter projects use different branch structures. Some templates have their working code on a
studio-v3branch,v3branch, or other feature branches rather thanmain. Check the repository's README or GitHub branches dropdown to see what branches exist.Template Installation Method: If you're using
npm create sanity@latestor similar CLI commands, the template should automatically pull from the correct branch. If you're manually cloning from GitHub, make sure you're:- Checking which branch the documentation references
- Looking at the repository's default branch (it might not be
main) - Checking if there are installation instructions that specify a branch
Outdated Template References: Some older templates or documentation might reference branches that have since been merged or renamed. Look for:
- Recent commits or PR activity
- Issues in the repository mentioning branch structure
- Alternative templates in the Sanity templates directory
What to do:
- Check the repository's branches on GitHub - click the branch dropdown to see all available branches
- Look at the repository's README for specific installation or branch instructions
- If this is an official Sanity template, check the Sanity Exchange for the most current version
- Try cloning with
git clone -b <branch-name>if you know the correct branch name - For official Sanity templates, using the CLI (
npm create sanity@latest) is usually more reliable than manual cloning
If you can share which specific template you're working with (a GitHub URL or template name), the community can give you more targeted help!
Show original thread18 replies
Sanity – Build the way you think, not the way your CMS thinks
Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.