GitHub 灾难:撤消恢复?

发布于 2024-12-15 21:05:18 字数 499 浏览 2 评论 0原文

我正在使用 GitHub 的可视化编辑器,并准备向项目的主分支提交更改。然而,当启动可视化编辑器时,它会立即弹出一条消息,提示存在冲突。它给了我“继续或中止”的选项。我一直试图继续,但它不起作用,因为会弹出一个新窗口,其中包含太多冲突,以至于它超出了页面范围。所以该窗口的底部可能有一个按钮,但如果有的话,就无法访​​问。不管怎样,我最终放弃了“继续”,然后点击了中止......

大错误。 Git 将我的所有工作恢复到上次提交,并且“显然”我在恢复之前所做的所有工作都消失了。有办法拿回来吗?

为了直观地展示这一点:

提交1->提交2->提交3-> (工作正在进行中,尚未承诺,)

尝试使用可视化编辑器进行提交,但最终失败并丢失了我的工作:

提交1->提交2->提交3

编辑:我“认为”发生的事情是意外的“变基:更新头”。我非常需要撤销它。

I was using the visual editor for GitHub and was ready to commit changes to the master branch of my project. However, when starting the visual editor, it would instantly popup with a message that there were conflicts. It gave me the options to "continue or abort". I kept trying to continue, but it wasn't working because a new window would pop up with so many conflicts that it stretched off the page. So there may have been a button at the bottom of that window, but if so, it was impossible to access. Anyway, I eventually gave up with "continue" and I hit abort...

Big mistake. Git reverted all my work back to my last commit and "apparently" all the work I had done before the revert is gone. Is there anyway to get it back?

To demonstrate this visually:

commit1 -> commit2 -> commit3 -> (work in progress, not committed yet, )

tried to use the visual editor to commit, but wound up with this and lost my work:

commit1 -> commit2 -> commit3

Edit: I "think" what happened is an accidental "rebase: updating head". I need to undo that badly.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文