github - git push -u origin 总是报错
滿天的星座
滿天的星座 2017-04-25 09:04:16
0
2
720

使用的是最新版本的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里面是如何复制啊。

现在这样了

滿天的星座
滿天的星座

reply all(2)
伊谢尔伦

Look at the prompt, isn’t it asking you to run it?....git config --global push.defaulthttp://www.oschina.net/news/45585/git-2-x-change-push-default-to-simple


Look what you have run, please run it

git config --global push.default simple

Follow the prompts, why can’t you add the branch name when pushing...囧...

为情所困
  1. It means that you did not specify which branch you want to commit to. git push 远程仓库 远程仓库所在分支 而你,只写了git push origin。 没有说明分支信息。 比如git push origin masterThat’s it.
  2. Right click-->Edit-->Select and then copy. Don't complain, this is a DOS approach, git for win is based on DOS.
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template