如何在 git 中撤消结帐? - How do I undo a checkout in git?

2021/12/04 04:09
阅读数 0

问题:

I just checked out an earlier commit from my local git repo.我刚刚从我的本地 git repo 中查看了一个较早的提交。 I haven't made any changes to it, I was just looking at it.我没有做任何改变,我只是看着它。 Now I want to go back to my latest commit - how do I do that?现在我想回到我最近的提交 - 我该怎么做?

The exact command I used to check it out:我用来检查它的确切命令:

git checkout e5dff6b3c5d704f9b598de46551355d18235ac08

Now when I type git log, at the top I see this checked out commit, but none of my later commits.现在,当我输入 git log 时,在顶部我看到这个已检出的提交,但我后来没有提交。 Did I accidentally delete those?我不小心删除了那些?


解决方案:

参考: https://stackoom.com/en/question/F71L
展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部