I want make push and get error: src refspec master does not match any

后端 未结 16 2014
梦如初夏
梦如初夏 2020-12-02 12:16

I\'m hosting on Heroku. I want to make a push:

git push master Heroku

I gets the message:

error: src refspec master does no         


        
16条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-02 12:38

    if you are writing ->

    "git push master Heroku"
    

    and getting error like->

    error: src refspec master does not match any. error: failed to push some refs to 'git@heroku.com: etc'

    then first type in hyper->

    git commit -m 'Initial commit'
    

    and then if there is an error like

    email ,name is not found or something like that
    

    then it might be possible that you could'nt sign in heroku page.

    first write type in hyper commond line or whatever cmd line you are using

    git config --global user.email "yourgmail address"
    

    then hit enter then type

    git config --global user.name "Your Name"
    

    then it will work fine. if you want to check that it is working fine then type

    git commit -m 'initial commit'
    

    it will take sometime and then write code

    git push heroku master
    

    -------------------------Now everything is solved-TADADAAAA-------------------------- Note-Please write your email address and username in above code...

提交回复
热议问题