git 由于 Eclipse 中的“正在应用... egit 错误”,应用隐藏提交“...”失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24932124/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Applying stashed commit '...' failed due to 'Applying... egit error in eclipse
提问by yehudahs
i am trying to apply a stash that I did through eclipse but I am getting the next error message : Applying stashed commit '...' failed due to 'Applying stashed changes resulted in a conflict'. how can I resolve the conflicts in eclipse ? tried to open sync view but I didn't see anything that need to be resolved... using eclipse kepler.
我正在尝试应用我通过 eclipse 执行的存储,但我收到下一条错误消息:由于“应用隐藏的更改导致冲突”,应用隐藏提交“...”失败。如何解决 eclipse 中的冲突?试图打开同步视图,但我没有看到任何需要解决的问题......使用 eclipse kepler。
回答by Erizo
I had the same problem when I stashed some work I was doing in order to do some last minute, urgent bug fixing.
当我隐藏一些我正在做的工作以便做最后一分钟的紧急错误修复时,我遇到了同样的问题。
In order to overcome this situation, I did the following in Eclipse (note that I used Luna version):
为了克服这种情况,我在 Eclipse 中做了以下操作(注意我使用的是 Luna 版本):
- Right click on the Eclipse project -> Team -> Show in Repositories View
- Find the "References" folder in the Repositories View, right click it, then select the "New Branch..." option.
- Create a new branch with the stashed changes.
- Checkout the original branch on which you want to apply the stash
- Merge both branches and resolve conflicts the usual way.
- 右键单击 Eclipse 项目 -> Team -> Show in Repositories View
- 在 Repositories View 中找到“ References”文件夹,右键单击它,然后选择“ New Branch...”选项。
- 使用隐藏的更改创建一个新分支。
- 签出要应用存储的原始分支
- 合并两个分支并以通常的方式解决冲突。
回答by David I.
I had this happen when I included untracked files in my stash. I did a reset HARD to clear my working copy, then ran this from the command-line (the stash I wanted was on top of the stack):
当我在我的存储中包含未跟踪的文件时,我发生了这种情况。我做了一个重置 HARD 来清除我的工作副本,然后从命令行运行它(我想要的存储在堆栈的顶部):
git stash apply --index
Now I see my modified files, and my "untracked" files reappear. Not sure why the GUI doesn't work.
现在我看到了我修改过的文件,并且我的“未跟踪”文件重新出现。不知道为什么 GUI 不起作用。
Using Eclipse Luna.
使用 Eclipse Luna。
回答by ropo
I get this error every time I apply changes from stashed commit in neon.1 Looks like a bug. One of many bugs in egit
每次我从 neon.1 中的隐藏提交应用更改时,我都会收到此错误。看起来像一个错误。egit 中的众多错误之一
回答by gravetii
This commonly happens when you stash your changes in one branch and apply them on another.
当您将更改存储在一个分支中并将它们应用到另一个分支时,通常会发生这种情况。
To resolve these conflicts, you need to search for <<<<<
which are git markers that git uses to tell you where and which branches have the conflicts.
要解决这些冲突,您需要搜索<<<<<
git 使用哪些 git 标记来告诉您在哪里以及哪些分支存在冲突。
Here's an exhaustive link that explains how to resolve the conflicts.
这是一个详尽的链接,解释了如何解决冲突。
回答by Sulfkain
Maybe you have change something and you need to stash this changes then you could apply the other stash.
也许你已经改变了一些东西,你需要存储这些更改,然后你可以应用其他存储。
I have used TortoiseGit and it said me more info about this problem.
我用过 TortoiseGit,它告诉我关于这个问题的更多信息。
Hope it's helps to resolve your problem :)
希望它有助于解决您的问题:)
回答by Hridaynath
If ==>
如果==>
- You have misteakenly applied stash changes to other branch
- Still You can not see the conflicts in file/s
- Replace with Index/Head doesn't work
- 您错误地将存储更改应用于其他分支
- 你仍然看不到文件/s中的冲突
- 替换为索引/标题不起作用
Then ==>
然后==>
Open "Git Staging" view, right click on file => replace with => Our version <....>.
打开“Git Staging”视图,右键单击文件 => 替换为 => 我们的版本 <....>。
This works for me. I hope it will work for you.
这对我有用。我希望它对你有用。
回答by Laura Liparulo
in my case in eclipse Oxygen it works if I go to Team>Stashes, click on the stash I want to resume and then in the "Stashed Commit" view click on the small brown and green Icon on the top on the right ("Apply stashed changes"). Very comfortable if you want to switch branches.
就我而言,在 eclipse Oxygen 中,如果我转到 Team>Stashes,单击我想恢复的 stash,然后在“Stashed Commit”视图中单击右侧顶部的棕色和绿色小图标(“Apply隐藏的更改”)。如果你想切换分支非常舒服。