Yes you can: Diff with EGit in Eclipse!

In my previous post on how to quickly view all the changes between two branches in Git I ended with the statement “Is there away to do the same in Eclipse with EGit?“. I Googled around for the answer a bit, but with no success. By accident I just discovered how to compare the working version of a file to the commited version. Not entirely the same, but getting closer 🙂 For the purpose of being able to quickly check what changes I have made to write meaningful commit messages this is sufficient for me.

Anyway, these are the steps:

  • Open Git Staging (Window > Show view > Git > Git Staging)
  • Double click on a file in “Unstaged Changes” or “Staged Changes”

And voilà! There is a beautiful window with a side to side diff of the working version and commited version. Nice! I hope this is useful.

Advertisements

Easy way to quickly view all the changes between two branches in Git

I was commiting some changes in Git and needed to view all the changes between, so that I could write a meaningful commit message. I used the following command to view the changes in each changed file:

git difftool -v development

This command is viewing the active branch (checked out branch) with the development branch. It will open the changed files one by one.

Is there away to do the same in Eclipse with EGit?