Common Questions

Support for our DiffMerge utility.

Moderator: SourceGear

Post Reply
Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Common Questions

Post by Beth » Wed Nov 26, 2014 9:08 am

In this thread I will post some common questions I see and their answers.

How Do I Exclude Comments?

I can't get DiffMerge Configured with Git


.
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Common Questions

Post by Beth » Wed Nov 26, 2014 9:11 am

How do I Exclude Comments

In DiffMerge go to your Tools - Options - File Windows - Rulesets.

If you have a Custom Ruleset that matches your file type, then select that file type and click Edit, or you can click Edit for the Default Ruleset if that is what is being applied. In the new window, click on Content Handling.

Click Add next to the Matched Contents.

Enter in the start pattern for your comment. If there is a space after your start pattern, then you don't need anything else, but if you start the comment right away, then you need a wildcard. For example, if my comments start with \\, I might use \\* as the pattern, because my comments look like
    • \\This is my comment.
After you set the Start Pattern, and if needed the End Patter, uncheck the option to Classify Differences as Important.

After you apply your changes your comments will no longer highlight.
Beth Kieler
SourceGear Technical Support

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Common Questions

Post by Beth » Mon Jul 25, 2016 1:27 pm

Can't make DiffMerge work with Git

In your .gitconfig, add these lines:

Code: Select all

[diff]
tool = diffmerge
[difftool "diffmerge"]
cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe \"$LOCAL\" \"$REMOTE\"

[merge]
tool = diffmerge
[mergetool "diffmerge"]
trustExitCode = true
cmd = C:/Program\\ Files/SourceGear/Common/DiffMerge/sgdm.exe /merge /result=\"$MERGED\" \"$LOCAL\" \"$BASE\" \"$REMOTE\"
Then when running a diff, add the switch

Code: Select all

-t=diffmerge
to use DiffMerge instead of the default.
Beth Kieler
SourceGear Technical Support

Post Reply