I know that I can view the difference between HEAD and current state with meld .. But how can I view the differences between branches, for example master and devel with meld?
At the moment I do the following steps:
- Rename folder of working copy
For examplemv /projectA /projectA_master) - Clone the project again
git clone url - Switch to
develbranch
cd projectA && git -b devel origin/devel - View differences with meld
meld /projectA_Master projectA
Isn’t there an easier way to get the same result in meld? I only need it to review the changes and not primarily for merging.
Short & sweet:
This configures Git to use
meldas the diff tool. (You don’t need to specify the command line arguments, support formeldis built into Git.)Then, if you want a graphical diff instead of a textual one, you simply invoke
git difftoolinstead ofgit diff(they both take the same arguments). In your case:Update: If you don’t want the one-file-at-a-time diff, but instead want to use meld’s “subdirectory” view with all the changes between the two branches, note the
-dor--dir-diffoption forgit difftool. For example, when I’m on branch XYZ and I want to see what is different between this and branch ABC, I run this: