| Title | 🔍 Meld (Merge & Diff) | |||
|---|---|---|---|---|
| Group | Dev & Tools | |||
| Icon | 🔍 | |||
| Order | 18 | |||
| tags |
|
Description: Meld is a free, open-source visual diff and merge tool for files, directories, and version-controlled projects. It provides two- and three-way comparison with syntax highlighting and real-time merge editing. Built with GTK, it integrates natively with GNOME but works on any Linux desktop. Meld — это бесплатный визуальный инструмент сравнения и слияния файлов, директорий и проектов с контролем версий. Поддерживает 2- и 3-стороннее сравнение.
Status: Actively maintained. Alternatives include KDiff3 (KDE-native, 3-way merge), Beyond Compare (commercial, cross-platform), vimdiff (terminal-based), and VS Code built-in diff. Role: Developer / Sysadmin
- Installation
- Basic CLI Usage
- Version Control Integration
- Keyboard Shortcuts
- Directory Comparison
- Official Documentation
# Ubuntu/Debian
sudo apt update
sudo apt install meld
# RHEL/AlmaLinux/Fedora
sudo dnf install meld
# macOS (Homebrew)
brew install --cask meldMeld is primarily a GUI tool, but passing arguments from the command line is the most common way to launch it. Meld — это прежде всего GUI-инструмент, но запуск из командной строки — самый частый способ использования.
# Compare two files (2-way diff)
meld file1.txt file2.txt
# Compare three files (3-way diff)
meld file1.txt file2.txt file3.txt
# View uncommitted changes in current Git/SVN repo
meld .
# Launch without files
meldIf you want Meld to automatically merge non-conflicting changes when comparing three files (usually in a VCS conflict scenario): Если вы хотите, чтобы Meld автоматически сливал бесконфликтные изменения при сравнении трёх файлов:
# Typical auto-merge syntax
meld --auto-merge <BASE> <LOCAL> <REMOTE> -o <MERGED_OUTPUT>To use Meld whenever you run git difftool:
git config --global diff.tool meld
git config --global difftool.prompt false # Replaces prompt with instant Meld / Убирает запрос подтверждения# Usage
git difftool # Diff working tree vs index / Сравнить рабочую копию
git difftool --cached # Diff index vs HEAD / Сравнить индекс (staged)
git difftool <COMMIT_A> <COMMIT_B> # Diff between two commits / Сравнить коммитыTo use Meld to resolve merge conflicts (git mergetool):
git config --global merge.tool meld
git config --global mergetool.prompt false# Usage
git merge <BRANCH_NAME>
# If conflict occurs:
git mergetoolTip
When resolving conflicts in a 3-way merge window, the middle pane is usually the final output file where you should combine changes. Left is usually LOCAL (your branch), Right is usually REMOTE (incoming branch). При разрешении конфликтов в 3-стороннем окне, средняя панель — это обычно итоговый файл. Слева — LOCAL (ваша ветка), справа — REMOTE (входящая ветка).
| Tool | Type | Description (EN / RU) | Best For |
|---|---|---|---|
| Meld | GUI (GTK) | Visual 2/3-way diff & merge / Визуальное 2/3-стороннее сравнение | GNOME users, directory diffs |
| KDiff3 | GUI (Qt) | 3-way merge with auto-merge / 3-стороннее слияние с авто-слиянием | KDE users, complex merges |
| vimdiff | Terminal | Vim-based inline diff / Vim-based построчное сравнение | Terminal-only environments |
| Beyond Compare | GUI (commercial) | Advanced file/folder comparison / Продвинутое сравнение файлов/папок | Professional use, cross-platform |
| VS Code | Editor | Built-in diff view / Встроенный просмотр различий | Developers already using VS Code |
| Key / Клавиша | Action (EN / RU) |
|---|---|
Alt + Down |
Next difference / Следующее различие |
Alt + Up |
Previous difference / Предыдущее различие |
Alt + Right |
Push changes from left pane to right pane / Копировать изменения вправо |
Alt + Left |
Push changes from right pane to left pane / Копировать изменения влево |
Ctrl + S |
Save file / Сохранить файл |
Ctrl + F |
Find / Найти |
Ctrl + G |
Find next / Найти следующее |
Ctrl + Shift + R |
Refresh comparison / Обновить сравнение |
Meld can compare entire folder structures. Meld может сравнивать целые структуры папок.
# Compare two directories
meld /path/to/dirA/ /path/to/dirB/
# Compare three directories
meld /path/to/dir1 /path/to/dir2 /path/to/dir3By default, Meld filters out some file types (object files, binaries).
You can toggle custom text filters via Preferences -> Text Filters.
По умолчанию Meld фильтрует некоторые типы файлов (объектные файлы, бинарники). Вы можете настроить текстовые фильтры через Preferences -> Text Filters.
Note
In directory view, files colored blue are new/modified, green are identical, red are missing. В директорийном режиме файлы: синие — новые/изменённые, зелёные — идентичные, красные — отсутствующие.
- Meld: https://meldmerge.org/
- Meld Help: https://meldmerge.org/help/
- Git Diff/Merge Tools: https://git-scm.com/docs/git-difftool