Reputation: 1249
I am currently working on a java project and when committing my changes and pulling I get the following error. I don't know how to resolve it:
I tried everything, but can't seem to fix the problem, can someone please help me?
To be clear, I am using eclipse.
Upvotes: 37
Views: 88875
Reputation: 1
The most simple and easy way is to Rebase
Upvotes: -1
Reputation: 111
below steps may help
delete non-versioned files
git clean -df
reset your local changes
git fetch
git reset --hard
Upvotes: 10
Reputation: 77
I resolved this error by selecting "Assume Unchanged" for the file that I was unable to delete.
STS, In the toolbar. Show View->Git Staging->Unstaged Changes.
OR
Right-click on the file->Team->Advanced->Assume Unchanged
Upvotes: 0
Reputation: 172
I had the same error as:
DIRTY_WORKTREE pom.xml
So I deleted the pom.xml from my working directory and did a pull from particular branch.
It worked for me.
Upvotes: 0
Reputation: 313
So... another option that worked for me and my DIRTY_WORKTREE... Stash your changes and then Pull.
This solution meant that I did NOT lose some local useful logging changes from simply deleting the offending file.
Upvotes: 0
Reputation: 4604
In my case, I had uncommitted changes.
I committed my changes and then I was able to merge successfully without dirty_worktree
error.
Upvotes: 0
Reputation: 11
Assuming your working in a local branch, that is branched from a remote branch, and the merge conflict is occurring after you 'commit and push' upstream, merge to remote branch.
Try these 3 steps:
Upvotes: 1
Reputation: 1236
I got the same error while trying to merge the code. Delete the respective file in either of the branches to merge
Upvotes: 6
Reputation: 28665
Delete the affected files and try to pull again. Thereafter push your changes to the git.
Upvotes: 60