git push 原始分支报错src refspec xxx does not match any
阿神
阿神 2017-05-02 09:37:30
0
2
676

首先这是一个别人做的项目 我现在要进行迭代

操作顺序如下
git config --global user.email ""
git config --global user.name ""
初次提交将其提交到本地仓库
git add .
git commit
提交到远程仓库
git remote add origin git@xxx

git pull orgin xxx
注意这里pull是可以拉取
但是push的话就会返回错误

错误信息如下:
error: src refspec xxx does not match any.
error: failed to push some refs to 'git@'

在stackOverflow 搜了一下 有解决方案
git push origin HEAD:branch

但是我是想问有没有方法恢复成如下的方式?
git push origin xxx

而且这里push的在git.log日志文件中 显示的是root

阿神
阿神

闭关修行中......

répondre à tous(2)
PHPzhong

Merci pour l'invitation. Vous pouvez exécuter git pull origin 分支, mais une erreur se produira si vous exécutez git push origin 分支 ! Comme c’est incroyable ! Vous pouvez l'exécuter localement ssh –T git@github.com et essayer de voir ce qui se passe

某草草

Votre entrepôt distant n’a pas de succursale correspondante, comment le pousser ?

git push -u origin master
Username for 'https://github.com': yourusername
Password for 'https://yourusername@github.com': 
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/yourusername/foobar.git'
//解决方案:

git init
git add .
git commit -m 'message'
git *create remote
git push -u origin master
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!