We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当提交了一些内容到 HEAD 后,又不小心 checkout 到其他分支,这时 GUI 工具里可能就再也找不到 HEAD 那次对应的提交了
此时可以使用git reflog命令来显示刚才提交的信息,找到 HEAD 那次提交并将其 SHA1 复制下来,在使用git checkout xxxxx(对应的 SHA1) 就可以恢复到那次提交了
git reflog
git checkout xxxxx(对应的 SHA1)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Git HEAD 丢失,如何找回
当提交了一些内容到 HEAD 后,又不小心 checkout 到其他分支,这时 GUI 工具里可能就再也找不到 HEAD 那次对应的提交了
此时可以使用
git reflog
命令来显示刚才提交的信息,找到 HEAD 那次提交并将其 SHA1 复制下来,在使用git checkout xxxxx(对应的 SHA1)
就可以恢复到那次提交了The text was updated successfully, but these errors were encountered: