Reputation: 673
I'm working with the Git plugin for Eclipse. To update my working directory, I used to do a Pull or a Fetch+Merge. When there is a conflict to resolve, I use the merge tool. But recently I tried a new approach.
To see what have been changed by others, I do a Fetch and after that, a Synchronise Workspace. If I try to do a commit and push after updating my code directly within the team synchronise view, I've got the "rejected-non-fast-forward" error.
I want to know if I can update my working directory using the team synchronise view or if the only way to do that it's via the merge action of Egit.
Upvotes: 5
Views: 14607
Reputation: 22070
"Synchronize workspace" and the team perspective are just other ways to display the changes. Both do not modify the underlying git workflow. You always have to merge incoming changes before committing your changes, when pushing to a shared repository.
However, if you always just want incoming changes to be merged with your own local changes, then you might want to have a look at the "rebase" pull strategy of your local branch. That basically temporarily removes your own changes, pulls the remote changes into your branch and re-applies your own local changes. You will still have to resolve merge conflicts, if they occur.
Upvotes: 9