GitHub - error: failed to push some refs to 'git@github.com:myrepo.git'

前端 未结 10 2032
滥情空心
滥情空心 2020-12-23 14:21

I am getting the following error. How do I resolve?: git add . git commit -m \'t\' git push origin development

To git@github.com:myrepo.git
 ! [         


        
相关标签:
10条回答
  • 2020-12-23 14:50

    you can write in your console:

    git pull origin
    

    then press TAB and write your "master" repository

    0 讨论(0)
  • 2020-12-23 14:50

    I have faced the same issue and resolved as follows (if you have a project in local folder then follow the steps):

    1. create a new repo in guthub
    2. go to local folder and do "git init"
    3. git remote add origin (with your repo url) // simply copy from your repo
    4. git add -A
    5. git commit -m "your commit"
    6. git push -u origin master
    0 讨论(0)
  • 2020-12-23 14:52

    Try this:

    1. git push -u origin master
    2. git push -f origin master

    Sometimes #1 works and sometimes #2 for me. I am not sure why it reacts in this way

    0 讨论(0)
  • 2020-12-23 14:55
    $ git fetch --unshallow origin
    $ git push you remote name
    
    0 讨论(0)
提交回复
热议问题