添加链接
link之家
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm having trouble pushing master to Heroku to deploy my Heroku app.

When I type in this code:

git push heroku master

I get this error:

error: src refspec master does not match any.
error: failed to push some refs to '[email protected]:evening-scrubland-91960.git'

Where [email protected]:evening-scrubland-91960.git is the name of my app.

If it helps, I'm using this website as a tutorial: https://devcenter.heroku.com/articles/getting-started-with-python#deploy-the-app

I've also used the following suggestions from the below website: I want make push and get error: src refspec master does not match any

You may also get the above error, if you are you still using "master" instead of "main".

Instead of: "git push heroku master"

Try: "git push heroku main"

This is just guessing of branch naming convention. It's official for github but git and github are completely different things – GTsvetanov Jan 8, 2021 at 20:10 @GTsvetanov heroku also changed master to main. so, this answer works for tens of people including me :) – marmeladze Sep 7, 2021 at 13:00

The log tells you everything: src refspec master does not match any means that there is nothing committed on master branch yet.

Be sure, that you have staged your changes using the git add command and committed them using the git commit command before pushing them to the remote.

What do I pass to git add? $ git add heroku // fatal: pathspec 'heroku' did not match any files – Alan Baljeu May 22, 2021 at 16:38

Resolving possible errors, such as: Error: spawn cmd ENOENT, Code: ENOENT,H10 no modulError

Go to the heroku site, create a new application. Done this, open command prompt administrator mode on your pc, just click with right button. It will open the command screen, in front of this, activate your k39 or k3X.com

activate k39

After:

heroku login

Validate the token on the heroku page, just click. No cmd change to project director.

cd C:\Users\Lancaster\PycharmProjects\ 

Put the address where the project is on your pc, do not put the example. Once that's done, the first time you're submitting the project, do:

git init
git config --global user.email "email@email"
git config --global user.name "nameapp"
heroku git:remote -a nameapp

Now add these commands, always when updating your page.

git add .
git commit -am "make it better"
git push heroku master

If you have a secondary page that is, you created more than one app or it is not the root or give an error in the final command, claiming not to be the master.

git push heroku

After that, the submission will occur normally.

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.