如何使用 EGit 从 head 替换 eclipse 项目为最新版本?

发布于 2025-01-07 08:53:03 字数 233 浏览 4 评论 0原文

我有一个 Eclipse 工作区,其中包含来自 git 的一堆项目,我使用 egit 来管理该项目。我通常会尝试失败的实验,并且我想将一个项目恢复到 git 存储库 HEAD 中的状态。

我该如何使用 Egit 做到这一点?

我尝试右键单击项目“替换为”> Head Revision 会导致 eclipse 崩溃。我是从 svn 迁移到 git 的新手。对于项目来说,是否有相当于 svn revert 的功能?

I have an eclipse workspace with a bunch of projects from git, I am using egit to manage the project. I typically try out experiments which fail, and I want to take a project and restore it to exactly its state in HEAD of the git repo.

How do I do that with EGit?

I have tried to right click on the project Replace With > Head Revision which causes eclipse to crash. I am new to git migrated from svn. is there an equivalent of svn revert for a project?

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

红ご颜醉 2025-01-14 08:53:03

如果您没有任何不想丢失的非版本化文件(即“私有”文件),那么您可以尝试将工作树重置为当前的 HEAD。

请参阅“重置当前 HEAD ”,选择“硬”选项。

If you don't have any non-versioned files (ie "private" files) that you don't want to lose, then you can try and reset your working tree to your current HEAD.

See "Resetting your current HEAD ", choosing the "hard" option.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文