I have only one branch. For a few months I have been using
git push origin master
to commit to my local repository. Last night after I made some minor changes to my local repository and tried to push using the same command, I got this error:
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
I googled and found questions such as this one and this one, but none of the answers to these questions solves my problem.
Most of the answers suggest the problem of detached head. Yet I don't think my head is detached. Nor do I think I am on the wrong branch (as I only have one branch...)
I did a few experiments to figure out what's wrong, and here are the results I got:
(1) First comes my git status
output
# 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) When I type git reflog
, I can see all my local commits, but the remote repository just won't get updated.
(3) When I type git branch -a
, I get
* master
remotes/origin/master
(4) When I type git remote show origin
, I get
* 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)
I think the last line of output (the "fast-forwardable") is weird, but I am not sure what is wrong...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…