我只有一个分支。几个月来我一直在使用git推送失败:RPC失败;结果= 22,HTTP代码= 411
git push origin master
提交到我的本地存储库。昨晚之后,我做了我的本地库中一些细微的变化,并试图使用相同的命令来推动,我得到这个错误:
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
我用Google搜索,发现问题,如this one和this one,但没有答案的这些问题解决了我的问题。
大多数的答案暗示分离头的问题。然而我不认为我的头是分离的。我也不认为我是在错误的分支(因为我只有一个分支...)
我做了几个实验弄清楚什么是错的,这里是我得到的结果:
(1 )首先是我的git status
输出
# On branch master # Untracked files: # (use "git add <file>..." to include in what will be committed) # # egal.aux # egal.blg # egal.out # egal.pdf # egalcar.aux # egalcar.blg # egalcar.pdf nothing added to commit but untracked files present (use "git add" to track)
(2)当我输入git reflog
,我可以看到我所有的本地提交,但远程仓库就不会得到更新。
(3)当我输入git branch -a
,我得到
* master remotes/origin/master
(4)当我输入git remote show origin
,我得到
* remote origin Fetch URL: http://github.com/CherryQu921/egaldoc_en Push URL: http://github.com/CherryQu921/egaldoc_en HEAD branch: master Remote branch: master tracked Local ref configured for 'git push': master pushes to master (fast-forwardable)
我想输出的最后一行(“快可转发“)是奇怪的,但我不知道有什么问题...
'fast-forwardable'意味着您可以将您的本地更改推送到远程分支,没有犯罪行为:-) –