我想将提交推送到两个存储库中,如下所示:
[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/*
直到今天(几乎)完美地工作。上次推送(通过PhpStorm IDE)导致此错误:
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
不幸的是,远程服务器上没有这些提交,我再也看不到它们在localhost上(使用git status
)。但是我找到了get reflog
命令:
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
如何跳回7829ccc
提交(没有数据丢失)并尝试重新推送?我找到了一些荒谬的解决方案,例如。制作新的git clone并从旧项目中复制更改,但我不想这样做......
答案 0 :(得分:1)