Using EGit with Eclipse when I try to push my code into the remote repository I get an error message saying that I should pull first, as shown in Figure 1.
Make sure that:
The OP Krige adds:
in the end I noticed a class file was mentioned in the
DIRTY_WORKTREE
error message.
I deleted that file from the file system, did a pull, resolved the conflicts and pushed.
Everything seems to work fine now.
If you have the DIRTY_WORKTREE issue and you are not able to delete the file (for whatever reasons), you should do a pull, or replace with HEAD and then add to Index. This will resolve the conflicts (assuming use of the merge tool) and you should then be able to commit/push your changes, or else pull again.