The Visual Diff And Merge Tool For Developers
Meld compares files, folders and version controlled projects.
Meld can perform three-way comparison if desired. Merge branches, resolve conflicts visually side-by-side for popular version control systems such as Git. Meld is free, open source and cross-platform (Mac, Windows and Linux) and integrates seamlessly with popular IDEs.
Identical files will not produce an output. It is not wise for Binary files to be opened directly.
The focus of this tutorial will be on the differences between 2 text files, 2 binary files and 3 folders.
- Creating 2 files and 3 folders.
- Running the Meld command on the 2 files.
- Running the Meld tool on the 3 folders.
- Explaining the output diff or patch.
Requirements For Using Meld
Glossary:
IDE
Integrated Development Environment is a software application used for software development.
Patch
Set of differences.
Diff
Tool used to compare files or sets of files and highlight their differences.
Merge
Combines changes from different versions or branches of a project into a single, unified version.
Binary File
Computer file that is not a text file.
Tools
Name | Description | Example |
---|---|---|
Bitmap editor | For creating and editing bitmap images | GNU Image Manipulation Program (GIMP) |
Text editor | For creating and editing source code | Apache Netbeans IDE |
SSH | Secure Shell Client | OpenSSH |
Shell Access | Access to the command line. | Terminal |
Meld | File comparison utility. | Meld |
Name | Description | Example |
Create First Text File
# Create New Text File # cat > test1.txt << 'EOF' Check out the awesome feature On Ojambo.com For making a donation In the header bar EOF
Create Second Text File
# Clone New Text File # cp test1.txt test2.txt
Create Third Text File
# Create New Text File # cat > test3.txt << 'EOF' Check out the awesome feature On OjamboShop.com For taking a course In the header bar EOF
Compare Any Two Files
# Compare Files With Meld # meld test1.txt test2.txt meld test1.txt test3.txt meld test1.jpg test2.jpg meld test1.jpg test3.jpg
Compare Any Three Files
# Compare Files With Meld # meld test1.txt test2.txt test3.txt meld test1.jpg test2.jpg test3.jpg meld test1.txt test2.txt test1.jpg
Explanation:
- The first and second files are the same.
- The first and third files are different.
- Binary files out only state if they “differ”.
The Meld tool will compare 2 or 3 files and folders. Access the “Format as Patch…” feature from the Comparison menu in Meld.





Usage
You can start Meld on the command-line, file manager or from the application start menu. For this tutorial, Meld was used on text files and binary files. Meld can be downloaded from Meld.
Open Source
Meld is licensed under the GNU General Public License Version 2.0 or later. The copyleft license comes with strict rules and requirements to ensure the software remains free and open-source. It allows commercial use, modification, distribution, and allows making derivatives proprietary, consult the license for more specific details.
Conclusion:
Meld is a powerful visual diff and merge tool. Developers can use the tool streamline code reviews and resolve conflicts. Meld can compliment source code management version control systems such as Git in merging branches.
The programmer can determine which changes to revert based on the line number output. Use Meld to annotate code, provide clear feedback, and track changes during code reviews.
If you enjoy this article, consider supporting me by purchasing one of my WordPress Ojambo.com Plugins or programming OjamboShop.com Online Courses or publications at Edward Ojambo Programming Books or become a donor here Ojambo.com Donate
References:
- Meld Visual Diff And Merge Tool
- Customer Sets Price Plugin for WooCommerce on Ojambo.com
- Learning JavaScript Course on OjamboShop.com
- Learning Python Course on OjamboShop.com
- Learning PHP Course on OjamboShop.com
- Learning JavaScript Paperback on Amazon
- Learning JavaScript Ebook on Amazon
- Learning Python Ebook on Amazon
- Learning PHP Ebook on Amazon
- OjamboServices.com For Custom Websites, Applications & Tutorials