2

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...

mrtnzlml
  • 109
  • 1
  • 8
  • Try pushing to an SSH url instead of an HTTP one. – gravetii May 24 '14 at 18:33
  • What is it changing @gravetii? Cannot push it again, because the commit seems pushed already. There are only changes I've made after this unsuccessful push... – mrtnzlml May 24 '14 at 20:58

1 Answers1

1

Yaay! (-: I finally solved this issue thank to this question.

So the solution is actually simple:

git push origin 7829ccc:pictures
Community
  • 1
  • 1
mrtnzlml
  • 109
  • 1
  • 8