Beyond Compare: Difference between revisions
mNo edit summary |
|||
Line 18: | Line 18: | ||
== Git Integration == | == Git Integration == | ||
[[File:SourceTree-BC.png|thumb|right| 450px]] | [[File:SourceTree-BC.png|thumb|right| 450px| SourceTree Preferences for Diff]] | ||
First of all make Beyond Compare reachable from the command line using the menu-option {{FormFCTW|8|blue|bold|Beyond Compare}} → {{FormFCTW|8|blue|bold|Install Command Line Tools}} which creates a symbolic link: | First of all make Beyond Compare reachable from the command line using the menu-option {{FormFCTW|8|blue|bold|Beyond Compare}} → {{FormFCTW|8|blue|bold|Install Command Line Tools}} which creates a symbolic link: | ||
<pre> | <pre> | ||
Line 27: | Line 27: | ||
Open SourceTree and go to menu option {{FormFCTW|8|blue|bold|SourceTree}} → {{FormFCTW|8|blue|bold|Preferences}} and click on the {{FormFCTW|8|blue|bold|Diff}} icon on top of the window. | Open SourceTree and go to menu option {{FormFCTW|8|blue|bold|SourceTree}} → {{FormFCTW|8|blue|bold|Preferences}} and click on the {{FormFCTW|8|blue|bold|Diff}} icon on top of the window. | ||
<br>Now fill the creates symbolic link into the <i>External Diff / Merge</i> as show on the right. Please note you have to change all input fields. | <br>Now fill the creates symbolic link into the <i>External Diff / Merge</i> as show on the right. Please note you have to change all input fields. | ||
=== Git CLI === | === Git CLI === | ||
Line 40: | Line 39: | ||
# To launch a diff using Beyond Compare | # To launch a diff using Beyond Compare | ||
$ git difftool file.ext | $ git difftool file.ext | ||
</pre> | |||
=== Sublime Merge Integration === | |||
The CLI for Sublime Merge is called {{FormFCTW|8|blue|bold|smerge}}. Make a symbolic link to /usr/local/bin/smerge. | |||
<pre> | |||
# To See what is configured | |||
$ git config --global --list | |||
# Merge - Sets the requested Merge Tool | |||
$ git config --global mergetool.smerge.cmd 'smerge mergetool "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"' | |||
$ git config --global mergetool.smerge.trustExitCode true | |||
$ git config --global merge.tool smerge | |||
# To launch a merge using Sublime Merge | |||
$ git mergetool | |||
</pre> | </pre> | ||
Revision as of 11:57, 16 September 2021
Beyond Compare
is a data comparison utility.
Aside from comparing files, the program is capable of doing side-by-side comparison of directories, FTP and SFTP directories, Dropbox directories, Amazon S3 directories, and archives.
It is available for Windows, Mac OS, and Linux operating systems.
A strength of Beyond Compare is that it can be configured as difftool and mergetool of version control systems, such as git. [1].
Rules
Minor diffs
Sometimes you don't want to see minor differences [2].
- Load a pair of DFM files showing the difference.
- Click the Session Settings button (aka Rules w/ umpire icon) or use the Session ⇨ Session Settings menu item.
- Switch to the Importance tab then click the Edit Grammar... button to open a second dialog.
- Click the New... button below the top listbox to open a third dialog.
- Change the Element Name option to something like Explicit*, change the Text Matching to Explicit(Left|Top|Width|Height) = \d+ and check the Match character case and Regular expression checkboxes, then click Ok, then click Ok again in the second dialog.
- Explicit* should now appear in the original dialog's Grammar Elements list.
- Uncheck it, then change the combobox at the bottom of the dialog from Use for this view only to Update session defaults.
Git Integration

First of all make Beyond Compare reachable from the command line using the menu-option Beyond Compare → Install Command Line Tools which creates a symbolic link:
/usr/local/bin/bcomp
SourceTree Integration
Open SourceTree and go to menu option SourceTree → Preferences and click on the Diff icon on top of the window.
Now fill the creates symbolic link into the External Diff / Merge as show on the right. Please note you have to change all input fields.
Git CLI
The Git Command Line Interface (Terminal usage) has the following commands in case of an collision:
# To See what is configured $ git config --global --list # Diff - Sets the requested Diff Tool $ git config --global diff.tool bc3 # To launch a diff using Beyond Compare $ git difftool file.ext
Sublime Merge Integration
The CLI for Sublime Merge is called smerge. Make a symbolic link to /usr/local/bin/smerge.
# To See what is configured $ git config --global --list # Merge - Sets the requested Merge Tool $ git config --global mergetool.smerge.cmd 'smerge mergetool "$BASE" "$LOCAL" "$REMOTE" -o "$MERGED"' $ git config --global mergetool.smerge.trustExitCode true $ git config --global merge.tool smerge # To launch a merge using Sublime Merge $ git mergetool
See also
- BC Technical Support, Using Beyond Compare with Version Control Systems (macOS).
Beyond Compare can be configured as the external difference utility in many popular VCS applications.
Reference
- ↑ Wikipedia], Beyond Compare.
- ↑ Stack Overflow, How do i make BC ignore certain differences while comparing.