Unsuccessful git push – cannot push again
I want to push commits into two repositories like this:
[remote "origin"]
url = https://mrtnzlml@bitbucket.org/mrtnzlml/www.zeminem.cz.git
url = https://github.com/mrtnzlml/www.zeminem.cz.git
fetch = +refs/heads/*:refs/remotes/origin/*
Works (almost) perfectly until today. Last push (via PhpStorm IDE) caused this error:
Push failed
error: Connection time-out while accessing https://mrtnzlml@bitbucket.org/mrtnzlml/www.zeminem.cz.git/info/refs?service=git-receive-pack
fatal: HTTP request failed
Unfortunately there are not these commits on the remote servers and I cannot see them on localhost anymore (using git status
). But I found get reflog
commmand:
91a20c9 HEAD@{0}: checkout: moving from pictures to develop
7829ccc HEAD@{1}: commit: WP like pictures draft
e59196f HEAD@{2}: checkout: moving from develop to pictures
How can I jump back to the 7829ccc
commit (without data lost) and try to repush it? I found some ridiculous solutions eg. make new git clone and copy changes from old project but I don't want to do that...
Yaay! (-: I finally solved this issue thank to this question.
So the solution is actually simple:
git push origin 7829ccc:pictures
链接地址: http://www.djcxy.com/p/49820.html
上一篇: 在追踪当前分支的远程分支上推送特定提交