Skip to content
ohsudo, Home

Tags

#push

src refspec
CI/CD

Git "error: src refspec main does not match any": commit first, or use the right branch name

Fix Git "error: src refspec main does not match any" on push: you have no commits yet, or your branch is called master. Check with git branch, then commit or rename it.

Beginner · 4 min read