Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Applying stashed commit '...' failed due to 'Applying... egit error in eclipse

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.

like image 532
yehudahs Avatar asked Jul 24 '14 11:07

yehudahs


4 Answers

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):

git stash apply --index

Now I see my modified files, and my "untracked" files reappear. Not sure why the GUI doesn't work.

Using Eclipse Luna.

like image 166
David I. Avatar answered Oct 19 '22 12:10

David I.


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):

  • 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.
like image 32
Erizo Avatar answered Oct 19 '22 14:10

Erizo


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

like image 39
ropo Avatar answered Oct 19 '22 12:10

ropo


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.

Here's an exhaustive link that explains how to resolve the conflicts.

like image 22
gravetii Avatar answered Oct 19 '22 13:10

gravetii