merge.1 revision 28619
1.de Id 2.ds Rv \\$3 3.ds Dt \\$4 4.. 5.Id $Id: merge.1,v 1.4 1997/02/22 15:47:50 peter Exp $ 6.ds r \&\s-1RCS\s0 7.TH MERGE 1 \*(Dt GNU 8.SH NAME 9merge \- 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 18incorporates all changes that lead from 19.I file2 20to 21.I file3 22into 23.IR file1 . 24The result ordinarily goes into 25.IR file1 . 26.B merge 27is useful for combining separate changes to an original. Suppose 28.I file2 29is the original, and both 30.I file1 31and 32.I file3 33are modifications of 34.IR file2 . 35Then 36.B merge 37combines both changes. 38.PP 39A conflict occurs if both 40.I file1 41and 42.I file3 43have changes in a common segment of lines. 44If a conflict is found, 45.B merge 46normally outputs a warning and brackets the conflict with 47.B <<<<<<< 48and 49.B >>>>>>> 50lines. 51A 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 63If there are conflicts, the user should edit the result and delete one of the 64alternatives. 65.SH OPTIONS 66.TP 67.B \-A 68Output conflicts using the 69.B \-A 70style of 71.BR diff3 (1), 72if supported by 73.BR diff3 . 74This merges all changes leading from 75.I file2 76to 77.I file3 78into 79.IR file1 , 80and generates the most verbose output. 81.TP 82\f3\-E\fP, \f3\-e\fP 83These options specify conflict styles that generate less information 84than 85.BR \-A . 86See 87.BR diff3 (1) 88for details. 89The default is 90.BR \-E . 91With 92.BR \-e , 93.B merge 94does not warn about conflicts. 95.TP 96.BI \-L " label" 97This option may be given up to three times, and specifies labels 98to be used in place of the corresponding file names in conflict reports. 99That is, 100.B "merge\ \-L\ x\ \-L\ y\ \-L\ z\ a\ b\ c" 101generates output that looks like it came from files 102.BR x , 103.B y 104and 105.B z 106instead of from files 107.BR a , 108.B b 109and 110.BR c . 111.TP 112.BI \-p 113Send results to standard output instead of overwriting 114.IR file1 . 115.TP 116.BI \-q 117Quiet; do not warn about conflicts. 118.TP 119.BI \-V 120Print \*r's version number. 121.SH DIAGNOSTICS 122Exit status is 0 for no conflicts, 1 for some conflicts, 2 for trouble. 123.SH IDENTIFICATION 124Author: Walter F. Tichy. 125.br 126Manual Page Revision: \*(Rv; Release Date: \*(Dt. 127.br 128Copyright \(co 1982, 1988, 1989 Walter F. Tichy. 129.br 130Copyright \(co 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. 131.SH SEE ALSO 132diff3(1), diff(1), rcsmerge(1), co(1). 133.SH BUGS 134It normally does not make sense to merge binary files as if they were text, but 135.B merge 136tries to do it anyway. 137.br 138