Update git working directory via EGit with Synchronize Workspace

I am working with a Git plugin for Eclipse. To update the working directory, I used Pull or Fetch + Merge . When a conflict is resolved, I use the merge tool . But recently I tried a new approach.

To find out what has changed by others, I do Fetch and then Sync workspace . If I try to commit and click after updating my code directly inside command synchronization, I have a "rejected without fast-forward" error.

I want to know if I can update my working directory using command synchronization, or if this is the only way to do this using the Egit merge action.

+4
source share
1 answer

"Synchronize the workspace," and the team are just other ways of displaying changes. Both do not modify the underlying git workflow. When moving to a common repository, it is always necessary to merge incoming changes before making changes.

However, if you always want incoming changes to be merged with your own local changes, you may need to look at the "rebase" pull strategies of your local branch . This basically temporarily deletes your own changes, deletes remote changes to your branch, and reapplies your own local changes. You will still have to resolve merge conflicts if they occur.

+8
source

All Articles