无法推送一些裁判

无法推送一些裁判

本文介绍了Git错误:src refspec master不符合任何错误:无法推送一些裁判的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用GIT,这是我输入的内容

>

  $ cd lis4368 /作业
$ git remote
$ git remote -v
$ git remote rm原产地

然后我输入它(这是BitBucket告诉我输入的内容)

  $ git remote add origin https://[email protected]/cpb09e/cpb09e.git 
$ git push -u origin master

我一直收到这个错误信息:

 错误:src refspec master与任何不匹配。 
错误:无法将一些文件推送到'https://[email protected]/cpb09e/cpb09e.git'

有人请求帮忙吗?我已经尝试了从git commit到rm -rf *的所有内容,并且我根本无法获取任何内容。

解决方案

原因是这个消息是:


  • 当repo被初始化时( git init lis4368 / assignments
  • ,但未提交任何提交



也就是说,如果您至少没有添加并提交过一次,则不会有本地 master 分支进行推送。



有关更多信息,请参阅。

I am trying to add a file to my repository on BitBucket and I am having trouble.

I am using GIT and this is what I type in

$ cd lis4368/assignments
$ git remote
$ git remote -v
$ git remote rm origin

and then I type this in (this is what BitBucket tells me to enter)

$ git remote add origin https://[email protected]/cpb09e/cpb09e.git
$ git push -u origin master

And I keep getting this error message:

error: src refspec master does not match any.
error: failed to push some refs to 'https://[email protected]/cpb09e/cpb09e.git'

Can someone pleas help me out? I have tried everything from git commit to rm -rf * and I cannot get anything to work at all.

解决方案

One classic root cause for this message is:

  • when the repo has been initialized (git init lis4368/assignments),
  • but no commit has ever been made

Ie, if you don't have added and committed at least once, there won't be a local master branch to push to.

See "Why do I need to explicitly push a new branch?" for more.

这篇关于Git错误:src refspec master不符合任何错误:无法推送一些裁判的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 09:22