How to use meld to view deleted changes. Using git as dvcs

I use GIT as my DVCS, on Ubuntu 10.04. It just works:

meld . 

in your current working directory awesome ... shows what the differences are from your working folder for the last commit.

I would like to be able to do the same in other circumstances. Say I want to view the changes after I received the remote branch? How can I do it? How can I see the differences with meld between two local branches ... I would like to know if there was a relatively easy way to do this.

thanks.

+4
source share
1 answer

If you need a command to compare files and allow merging, you should probably set the diff.tool and merge.tool configuration merge.tool to meld , for example.

 git config diff.tool meld 

Then you can use git difftool master origin/master to see the differences between the local master and the latest version of master from origin . However, this will only show the difference one file at a time - you need to exit meld and press enter to see the changes in the next file. If you want to see all the differences between two branches in meld using its recursive representation, I am not afraid to do this once.

However, I wrote a short script answer to a very similar question, which takes two refs (for example, two branches), unpacks them into temporary directories and runs meld to compare the two:

Anyway, if you just ran git fetch , you can compare the differences between your master and the version from origin using a script with:

 meld-compare-refs.py master origin/master 

... or compare two local branches with:

 meld-compare-refs.py master topic1 
+4
source

Source: https://habr.com/ru/post/1343113/


All Articles