相关疑难解决方法(0)

在git中推送提交时,src refspec master与any不匹配

我克隆了我的存储库:

git clone ssh://xxxxx/xx.git 
Run Code Online (Sandbox Code Playgroud)

但之后,我改变了一些文件,并addcommit他们,我想他们推到服务器:

git add xxx.php
git commit -m "TEST"
git push origin master
Run Code Online (Sandbox Code Playgroud)

但我得到的错误是:

error: src refspec master does not match any.  
error: failed to push some refs to 'ssh://xxxxx.com/project.git'
Run Code Online (Sandbox Code Playgroud)

git commit

2472
推荐指数
75
解决办法
173万
查看次数

git push到GitHub存储库分支给出错误"src refspec master不匹配任何"

我分叉了Flask存储库并从GitHub克隆了它的网站分支

git clone --recursive https://github.com/lovesh/flask.git -b website
Run Code Online (Sandbox Code Playgroud)

然后我配置了遥控器

git remote add upstream https://github.com/lovesh/flask.git -t website
git fetch upstream
Run Code Online (Sandbox Code Playgroud)

然后我做了更改(我没有创建任何额外的文件,但修改了2个文件)我不得不制作然后添加文件并提交这样的更改

git add .
git commit .
Run Code Online (Sandbox Code Playgroud)

这促使我对提交发表评论,我输入了评论.现在它告诉我了

2 files changed, 69 insertions(+), 7 deletions(-)
Run Code Online (Sandbox Code Playgroud)

但是当我尝试将这些更改推送到我的GitHub帐户时

git push origin master
Run Code Online (Sandbox Code Playgroud)

它显示错误

error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/lovesh/flask.git'
Run Code Online (Sandbox Code Playgroud)

我环顾四周,有这个问题的人说他们没有在这里这里做出改变.但我确实提交,即使它然后它显示我这个错误.确认我试过

git status 
Run Code Online (Sandbox Code Playgroud)

它表明了

# On branch website
# Your branch is ahead of 'origin/website' by 1 commit.
#
nothing to …
Run Code Online (Sandbox Code Playgroud)

git github

5
推荐指数
1
解决办法
4344
查看次数

Git push origin master获取'origin'似乎不是一个git存储库

我做了什么:

git init 
git remote add master www.xyz.org/git/arkad

fatal: 'origin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

我有http访问远程git.

如何解决这个问题?

谢谢.

git version-control

2
推荐指数
1
解决办法
2万
查看次数

标签 统计

git ×3

commit ×1

github ×1

version-control ×1