# Git Error: failed to push some refs to

DevFeed: [Git Error: failed to push some refs to](<https://devfeed.tech/articles/git-error-failed-to-push-some-refs-to-28174.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/git/2022/05/31/git-error-failed-to-push-some-refs-to.html>)

Author: Fuzzygroup

Published: 2022-05-31T04:34:00Z

Content type: article

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [Deployment-Driven Development](<https://devfeed.tech/topics/deployment-driven-development.md>), [software-development](<https://devfeed.tech/topics/software-development.md>)

Tags: [deploy](<https://devfeed.tech/tags/deploy.md>), [development](<https://devfeed.tech/tags/development.md>), [error](<https://devfeed.tech/tags/error.md>), [git](<https://devfeed.tech/tags/git.md>), [hatchbox](<https://devfeed.tech/tags/hatchbox.md>)

## AI overview

The author encountered `src refspec main does not match any` while pushing a new project to GitHub. They realized they had not yet added the project, and say that adding and committing files before pushing resolved the error. They also recommend getting deployment working early, while a project is simple, and note that HatchBox makes this easier.

## Source excerpt

So I was just stumbling through setting up a new project and getting it deployed when I hit this little gem: ❯ git push -u origin main error: src refspec main does not match any error: failed to push some refs to 'github.com:fuzzygroup/cartazzi.git' I did the obligatory "scratch my chin and play with my beard" that you do when you are confused (and it is late and you are tired). And then I realized - "Oh crap, it is NEW; I bet I never added yet." And lo and behold - a simple add / commit and push worked! Crappy ass error message though. Sigh. Note: Deployment first development is my new best practice - make things deploy initially when they are still simple. This is particularly easy when you use a deployment engine like HatchBox