LinuxCommandLibrary

merge

performs three-way file merge

TLDR

Three-way merge

$ merge [file] [base] [other]
copy
Output to different file
$ merge -p [file] [base] [other] > [merged]
copy
Quiet mode
$ merge -q [file] [base] [other]
copy
Show conflict markers
$ merge -A [file] [base] [other]
copy

SYNOPSIS

merge [options] file1 file2 file3

DESCRIPTION

merge performs three-way file merge. It combines changes from two files based on a common ancestor.
The tool is part of RCS. It writes conflicts with markers for manual resolution.

PARAMETERS

FILE1

File to receive changes.
FILE2
Common ancestor file.
FILE3
File with changes.
-p
Print to stdout.
-q
Quiet mode.
-A
Use diff3 markers.
--help
Display help information.

CAVEATS

Part of RCS. Conflicts need manual resolution. Exit code indicates conflicts.

HISTORY

merge is part of RCS (Revision Control System), providing three-way file merging capability.

SEE ALSO

diff3(1), diff(1), patch(1), rcs(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community