1GIT-MERGE-FILE(1)                 Git Manual                 GIT-MERGE-FILE(1)
2
3
4

NAME

6       git-merge-file - Run a three-way file merge
7

SYNOPSIS

9           git-merge-file [-L <current-name> [-L <base-name> [-L <other-name>]]]
10                   [-p|--stdout] [-q|--quiet] <current-file> <base-file> <other-file>
11

DESCRIPTION

13       git-file-merge incorporates all changes that lead from the <base-file>
14       to <other-file> into <current-file>. The result ordinarily goes into
15       <current-file>. git-merge-file is useful for combining separate changes
16       to an original. Suppose <base-file> is the original, and both
17       <current-file> and <other-file> are modifications of <base-file>. Then
18       git-merge-file combines both changes.
19
20       A conflict occurs if both <current-file> and <other-file> have changes
21       in a common segment of lines. If a conflict is found, git-merge-file
22       normally outputs a warning and brackets the conflict with <<<<<<< and
23       >>>>>>> lines. A typical conflict will look like this:
24
25
26           <<<<<<< A
27           lines in file A
28           =======
29           lines in file B
30           >>>>>>> B
31       If there are conflicts, the user should edit the result and delete one
32       of the alternatives.
33
34       The exit value of this program is negative on error, and the number of
35       conflicts otherwise. If the merge was clean, the exit value is 0.
36
37       git-merge-file is designed to be a minimal clone of RCS merge, that is,
38       it implements all of RCS mergeĀ“s functionality which is needed by
39       git(1).
40

OPTIONS

42       -L <label>
43           This option may be given up to three times, and specifies labels to
44           be used in place of the corresponding file names in conflict
45           reports. That is, git-merge-file -L x -L y -L z a b c generates
46           output that looks like it came from files x, y and z instead of
47           from files a, b and c.
48
49       -p
50           Send results to standard output instead of overwriting
51           <current-file>.
52
53       -q
54           Quiet; do not warn about conflicts.
55

EXAMPLES

57       git merge-file README.my README README.upstream
58           combines the changes of README.my and README.upstream since README,
59           tries to merge them and writes the result into README.my.
60
61       git merge-file -L a -L b -L c tmp/a123 tmp/b234 tmp/c345
62           merges tmp/a123 and tmp/c345 with the base tmp/b234, but uses
63           labels a and c instead of tmp/a123 and tmp/c345.
64

AUTHOR

66       Written by Johannes Schindelin <johannes.schindelin@gmx.de>
67

DOCUMENTATION

69       Documentation by Johannes Schindelin and the git-list
70       <git@vger.kernel.org>, with parts copied from the original
71       documentation of RCS merge.
72

GIT

74       Part of the git(7) suite
75
76
77
78
79Git 1.5.3.3                       10/09/2007                 GIT-MERGE-FILE(1)
Impressum