是否可以从 git reflog 检索提交
Is it possible to retrieve commit from git reflog
是否可以从 git reflog
收到的数据中恢复 git 提交?
git reflog
输出示例。
eff9143 HEAD@{14}: merge develop: Fast-forward
e3ad8f7 HEAD@{15}: checkout: moving from develop to master
eff9143 HEAD@{16}: commit: Add Login view. Setting up project structure.
e3ad8f7 HEAD@{17}: checkout: moving from master to develop
e3ad8f7 HEAD@{18}: commit: Add LaunchScreen
当然可以。
在这里阅读所有相关信息:
您可以做的是创建新分支或将当前分支重置为您想要的提交,然后再进行处理。
# create new branch
git checkout -b <name> <sha-1>
# "move" the current branch to any given commit
git reset HEAD --hard
同样,上述答案中详细描述了所有内容。
是否可以从 git reflog
收到的数据中恢复 git 提交?
git reflog
输出示例。
eff9143 HEAD@{14}: merge develop: Fast-forward
e3ad8f7 HEAD@{15}: checkout: moving from develop to master
eff9143 HEAD@{16}: commit: Add Login view. Setting up project structure.
e3ad8f7 HEAD@{17}: checkout: moving from master to develop
e3ad8f7 HEAD@{18}: commit: Add LaunchScreen
当然可以。
在这里阅读所有相关信息:
您可以做的是创建新分支或将当前分支重置为您想要的提交,然后再进行处理。
# create new branch
git checkout -b <name> <sha-1>
# "move" the current branch to any given commit
git reset HEAD --hard
同样,上述答案中详细描述了所有内容。