I’m using GIT as my DVCS, on Ubuntu 10.04. Simply running:
meld .
in your current working directory is awesome…shows what are the diffs from your working folder to last commit.
I’d like to be able to do the same thing in other circumstances. Say I want to review the changes after I’ve fetched a remote branch? How would I do that? How can I review the differences with meld between two local branches… I’d love to know if there was a relatively simple way to do that.
Thx.
If you like meld for comparing files and resolving merges, you should probably set the config options
diff.toolandmerge.tooltomeld, e.g.You can then use
git difftool master origin/masterto view the differences between your localmasterand the most recently fetched version ofmasterfromorigin. However, that will only show the differences one file at a time – you have to exit meld and hit enter to see the changes in the next file. If you’d like to see all the differences between two branches in meld, using its recursive view, there’s not a one-line way of doing that, I’m afraid.However, I wrote a short script in answer to a very similar question that takes two refs (e.g. two branches), unpacks them to temporary directories and runs meld to compare the two:
Anyway, if you’ve just run
git fetchyou can compare the differences between yourmasterand the version fromoriginusing that script with:… or compare two local branches with: