Debian Codegraph @

upstream/debian-unstable/man1/merge.1

raw
1 .ds Rv 5.10.1
2 .ds Dt 2025-12-02
3 .ds i \&\s-1ISO\s0
4 .ds r \&\s-1RCS\s0
5 .ds u \&\s-1UTC\s0
6 .ds o \*r file
7 .TH MERGE 1 "\*(Dt" "GNU RCS \*(Rv"
8 .SH NAME
9 merge \- three-way file merge
10 .SH SYNOPSIS
11 .B merge
12 [
13 .I "options"
14 ]
15 .I "file1 file2 file3"
16 .SH DESCRIPTION
17 .B merge
18 incorporates all changes that lead from
19 .I file2
20 to
21 .I file3
22 into
23 .IR file1 .
24 The result ordinarily goes into
25 .IR file1 .
26 .B merge
27 is useful for combining separate changes to an original. Suppose
28 .I file2
29 is the original, and both
30 .I file1
31 and
32 .I file3
33 are modifications of
34 .IR file2 .
35 Then
36 .B merge
37 combines both changes.
38 .PP
39 A conflict occurs if both
40 .I file1
41 and
42 .I file3
43 have changes in a common segment of lines.
44 If a conflict is found,
45 .B merge
46 normally outputs a warning and brackets the conflict with
47 .B <<<<<<<
48 and
49 .B >>>>>>>
50 lines.
51 A typical conflict will look like this:
52 .LP
53 .RS
54 .nf
55 .BI <<<<<<< " file A"
56 .I "lines in file A"
57 .B "======="
58 .I "lines in file B"
59 .BI >>>>>>> " file B"
60 .RE
61 .fi
62 .LP
63 If there are conflicts, the user should edit the result and delete one of the
64 alternatives.
65 .SH OPTIONS
66 .TP
67 .B \-A
68 Output conflicts using the
69 .B \-A
70 style of
71 .BR diff3 (1),
72 if supported by
73 .BR diff3 .
74 This merges all changes leading from
75 .I file2
76 to
77 .I file3
78 into
79 .IR file1 ,
80 and generates the most verbose output.
81 .TP
82 \f3\-E\fP, \f3\-e\fP
83 These options specify conflict styles that generate less information
84 than
85 .BR \-A .
86 See
87 .BR diff3 (1)
88 for details.
89 The default is
90 .BR \-E .
91 With
92 .BR \-e ,
93 .B merge
94 does not warn about conflicts.
95 .TP
96 .BI \-L " label"
97 This option may be given up to three times, and specifies labels
98 to be used in place of the corresponding file names in conflict reports.
99 That is,
100 .B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c"
101 generates output that looks like it came from files
102 .BR x ,
103 .B y
104 and
105 .B z
106 instead of from files
107 .BR a ,
108 .B b
109 and
110 .BR c .
111 .TP
112 .BI \-p
113 Send results to standard output instead of overwriting
114 .IR file1 .
115 .TP
116 .BI \-q
117 Quiet; do not warn about conflicts.
118 .TP
119 .BI \-V
120 Print \*r's version number.
121 .SH DIAGNOSTICS
122 Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble.
123 .ds EY 1990, 1991, 1992, 1993, 1994, 1995
124 .SH IDENTIFICATION
125 Author: Walter F. Tichy.
126 .br
127 Manual Page Revision: \*(Rv; Release Date: \*(Dt.
128 .br
129 Copyright \(co 2010-2022 Thien-Thi Nguyen.
130 .br
131 Copyright \(co \*(EY Paul Eggert.
132 .br
133 Copyright \(co 1982, 1988, 1989 Walter F. Tichy.
134 .br
135 .SH "SEE ALSO"
136 .BR diff3 (1),
137 .BR diff (1),
138 .BR rcsmerge (1),
139 .BR co (1).
140 .PP
141 The full documentation for \*r is maintained as a Texinfo manual.
142 If the
143 .BR info (1)
144 and \*r programs are properly installed at your site, the command
145 .IP
146 .B info rcs
147 .PP
148 should give you access to the complete manual.
149 Additionally, the \*r homepage:
150 .IP
151 .B http://www.gnu.org/software/rcs/
152 .PP
153 has news and links to the latest release, development site, etc.
154 .SH BUGS
155 It normally does not make sense to merge binary files as if they were text, but
156 .B merge
157 tries to do it anyway.
158 .br