recherche

Maison  >  Questions et réponses  >  le corps du texte

github - git push -u origin 总是报错

使用的是最新版本的git,push到远程总是报错。我所有的额执行代码如下:

git init
git add .
git commit -a -m "first commit"
git remote add origin git@github.com:zbphp/zbphp.com.git
git push -u origin

结果报错,然后有的时候会提交到远程,有的时候又无法提交到远程,很奇怪

补充

我之后运行了

git config --global push.default origin
git config --global push.default #输出origin

#然后我再提交,结果报错了,连提交都不能了
git push 
git push -u origin #也报错了

另外,bash里面是如何复制啊。

现在这样了

滿天的星座滿天的星座2843 Il y a quelques jours719

répondre à tous(2)je répondrai

  • 伊谢尔伦

    伊谢尔伦2017-04-25 09:06:16

    Regardez l'invite, ne vous demande-t-elle pas d'exécuter git config --global push.default....
    http://www.oschina.net/news/45585/git-2-x-change-push- par défaut - simple


    Regardez ce que vous avez couru, s'il vous plaît, courez

    git config --global push.default simple
    

    Suivez les instructions, pourquoi ne pouvez-vous pas ajouter le nom de la branche lorsque vous appuyez sur... 囧...

    répondre
    0
  • 为情所困

    为情所困2017-04-25 09:06:16

    1. Cela signifie que vous n'avez pas précisé dans quelle branche vous souhaitez vous engager. git push 远程仓库 远程仓库所在分支 Et vous n'avez écrit que git push origin. Aucune information sur la succursale n'est indiquée. Par exemple git push origin masterC'est très bien.
    2. Clic droit-->Modifier-->Sélectionner puis copier. Ne vous plaignez pas, c'est une approche DOS, git for win est basé sur DOS.

    répondre
    0
  • Annulerrépondre