1GIT-MERGE-INDEX(1) Git Manual GIT-MERGE-INDEX(1)
2
3
4
6 git-merge-index - Run a merge for files needing merging
7
9 git-merge-index [-o] [-q] <merge-program> (-a | -- | <file>*)
10
12 This looks up the <file>(s) in the index and, if there are any merge
13 entries, passes the SHA1 hash for those files as arguments 1, 2, 3
14 (empty argument if no file), and <file> as argument 4. File modes for
15 the three files are passed as arguments 5, 6 and 7.
16
18 --
19 Do not interpret any more arguments as options.
20
21 -a
22 Run merge against all files in the index that need merging.
23
24 -o
25 Instead of stopping at the first failed merge, do all of them in
26 one shot - continue with merging even when previous merges returned
27 errors, and only return the error code after all the merges are
28 over.
29
30 -q
31 Do not complain about failed merge program (the merge program
32 failure usually indicates conflicts during merge). This is for
33 porcelains which might want to emit custom messages.
34 If "git-merge-index" is called with multiple <file>s (or -a) then it
35 processes them in turn only stopping if merge returns a non-zero exit
36 code.
37
38 Typically this is run with the a script calling git´s imitation of the
39 merge command from the RCS package.
40
41 A sample script called "git-merge-one-file" is included in the
42 distribution.
43
44 ALERT ALERT ALERT! The git "merge object order" is different from the
45 RCS "merge" program merge object order. In the above ordering, the
46 original is first. But the argument order to the 3-way merge program
47 "merge" is to have the original in the middle. Don´t ask me why.
48
49 Examples:
50
51
52 torvalds@ppc970:~/merge-test> git-merge-index cat MM
53 This is MM from the original tree. # original
54 This is modified MM in the branch A. # merge1
55 This is modified MM in the branch B. # merge2
56 This is modified MM in the branch B. # current contents
57 or
58
59
60 torvalds@ppc970:~/merge-test> git-merge-index cat AA MM
61 cat: : No such file or directory
62 This is added AA in the branch A.
63 This is added AA in the branch B.
64 This is added AA in the branch B.
65 fatal: merge program failed
66 where the latter example shows how "git-merge-index" will stop trying
67 to merge once anything has returned an error (i.e., "cat" returned an
68 error for the AA file, because it didn´t exist in the original, and
69 thus "git-merge-index" didn´t even try to merge the MM thing).
70
72 Written by Linus Torvalds <torvalds@osdl.org> One-shot merge by Petr
73 Baudis <pasky@ucw.cz>
74
76 Documentation by David Greaves, Junio C Hamano and the git-list
77 <git@vger.kernel.org>.
78
80 Part of the git(7) suite
81
82
83
84
85Git 1.5.3.3 10/09/2007 GIT-MERGE-INDEX(1)