Our various git repositories contain minified JavaScript code here and there (long one-liners), and when this code changes and is regenerated by our compiler, SourceTree often has a really hard time displaying the diff. Most of these minified files are between 60KB and 170KB in size, and if I happen click one of those files in the file list by accident (it's always an accident – I'm never actually interested in viewing the diffs of minified compiled code), SourceTree then freezes for about 1-2 minutes and gives me the spinning beachball. My CPU usage goes through the roof during that time. I can't do anything in the app – can't cancel the diff, can't browse any of the other repositories. I just have to force it to quit or wait until it's finished processing.
It's really starting to affect my productivity negatively. I have to be very careful about which files I click in the list of modified files. Sometimes it's unavoidable, however, because if I click a commit for which a minified JS file is the first file in the list of changed files, SourceTree generates the diff automatically, and I'm stuck again for 1-2 minutes.
As a temporary workaround until SourceTree's diff algorithm for long one-liners is smarter and more performant, is there a way to prevent SourceTree from trying to diff particular files in my respository? I wish I could add these files to .gitignore, but unfortunately our project environment requires these files be tracked and versioned in the repo.
Cheers.