Reputation: 3829
I am working with git for the first time and I have cloned a repository and a colleague has made some local changes to it.
Reading an article it implied that rather than just pull we should fetch first and then have a look at the changes.
I am using the EGit plugin, in the repositories window I have right clicked and chosen the option fetch from upstream, I can see that the FETCH_HEAD shows the commit message and so does the remote branch but I cannot see an option to compare it with the local repository.
I figured there must be a way to do this otherwise why have 2 commands supported but is not obvious how to compare the changes.
I am only able to compare them if I first do a merge but by then its a bit late so I might as well have just done pull.
Does anyone know how to compare what was fetched with the local copy in EGit?
Upvotes: 0
Views: 633
Reputation: 3736
Use Team ==> Synchronize on your Project. It will open the standard Synchronize-View, where you can see what changes to what files will come in and what you made to commit.
Files that have incoming change have a blue arrow, files with outgoing change a black arrow and a star. Files with just a black arrow are committed changes which aren't pushed yet.
Double click on a file to open the compare editor, which will show you the changed lines.
Synchronize will only compare the files, it wont make a commit or pull unless you do it with the pull/push/commit commands.
In the options of EGit you can change a setting, if EGit should do a Fetch before Synchronize.
Upvotes: 1