Sometimes when I look at changes to Salesforce metadata using a git diff tool like SourceTree it is not clear what's actually changed. If one block of XML has been deleted and another one inserted the diff tool will merge them together so that I see lots of insertion/deletion pairs. Is there a better way to see what's really changed?
This answer is relevant to Salesforce metadata and also to anyone dealing with large blocks of XML or similar repetitive text. When working with large files in version control, especially large XML files like you get when working with Salesforce, the default behavior of git is sometimes not ideal. When one block of XML is removed and another one inserted, Git can sometimes merge those two together making the apparent changes hard to decipher. You can make a huge improvement to this behavior by changing your default git diff algorithm to one called "patience" by running this command on the command line.
git config --global diff.algorithm patience