How to set difftool/mergetool for a specific file extension in Git?

Is it possible to set a custom tool for merging files with a specific extension in Git?

Thanks for any pointers!


I wasn't able to come up with any better solution than defining a custom difftool and calling it by hand as @jarodeells suggested:

    tool = mydiff
[difftool "mydiff"]
    cmd=" \"$LOCAL\" \"$REMOTE\""

Then calling it explicitly:

$ git difftool -t mydiff someFileWith.ext


If not already supported, install a shell script that keys off the extension and calls the correct merge tool.

Need Your Help

Reference specific properties of an object in for loop


I have a matchCenterItem object in my Parse cloud code with properties like categoryId, minPrice, etc. What I want to do is iterate through every instance of matchCenterItem that a user has, and then

WP7: ListBox ScrollToTop?

silverlight listbox scroll windows-phone-7

In a Windows Phone 7 Silverlight app, I have a ListBox with a lot of items, that are generated dynamically from an external data source. One of these items will be "current", so I would like to

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.