更新时间:2023-11-03 19:22:04
如果您刚刚完成了rebase,您可以尝试:
If you have just done the rebase, you can try as mentioned here:
git reset --hard ORIG_HEAD
as JakubNarębski 详细信息:
ORIG_HEAD
是之前的状态HEAD
,由可能具有危险行为的命令设置,以便于恢复它们。
现在,Git ha s引用日志:HEAD @ {1}
大致相当于ORIG_HEAD
(HEAD @ {1 }
始终是HEAD的最后一个值,
,
ORIG_HEAD
是,因为
ORIG_HEAD
is previous state ofHEAD
, set by commands that have possibly dangerous behavior, to be easy to revert them.
It is less useful now that Git has reflog:HEAD@{1}
is roughly equivalent toORIG_HEAD
(HEAD@{1}
is always last value ofHEAD
,ORIG_HEAD
is last value ofHEAD
before dangerous operation).
em> rebase, reflog 仍然可以帮助。
If you have executed some operations since the rebase, the reflog can still help.