# 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: tutorial

Language: en

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

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

Tags: [commit](<https://devfeed.tech/tags/commit.md>), [deploy](<https://devfeed.tech/tags/deploy.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [development](<https://devfeed.tech/tags/development.md>), [git](<https://devfeed.tech/tags/git.md>), [refs](<https://devfeed.tech/tags/refs.md>)

## AI overview

The article explains that Git's "src refspec main does not match any" error occurred because the new project had not yet been added or committed. Adding and committing the project before pushing resolved the error.

## 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