【发布时间】:2012-12-13 00:45:45
【问题描述】:
我分叉了 Flask 存储库并从 GitHub 克隆了它的网站分支
git clone --recursive https://github.com/lovesh/flask.git -b website
然后我配置远程像
git remote add upstream https://github.com/lovesh/flask.git -t website
git fetch upstream
然后我进行了更改(我没有创建任何其他文件,但修改了 2 个文件)我必须进行然后添加文件并像这样提交更改
git add .
git commit .
这提示我对提交发表评论,我输入了评论。现在它向我展示了
2 files changed, 69 insertions(+), 7 deletions(-)
但是当我尝试将这些更改推送到我的 GitHub 帐户时
git push origin master
显示错误
error: src refspec master does not match any.
error: failed to push some refs to 'https://github.com/lovesh/flask.git'
我环顾四周,遇到此问题的人说他们没有以here 和here 提交更改。但我确实提交了,即使它向我显示了这个错误。 确认我试过了
git status
它显示了
# On branch website
# Your branch is ahead of 'origin/website' by 1 commit.
#
nothing to commit (working directory clean)
另外git log 也会在日志中显示我的提交。我是 git 新手。我错过了什么吗?
【问题讨论】: