Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 88 lines (67 sloc) 2.66 kb
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
1 git-merge-index(1)
2 ==================
3
4 NAME
5 ----
7c73c66 Autogenerated HTML docs for v1.5.0-rc1-g72fe
Junio C Hamano authored
6 git-merge-index - Run a merge for files needing merging
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
7
8
9 SYNOPSIS
10 --------
fce7c7e Autogenerated HTML docs for v1.5.6.1-156-ge903b
Junio C Hamano authored
11 'git merge-index' [-o] [-q] <merge-program> (-a | [--] <file>\*)
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
12
13 DESCRIPTION
14 -----------
15 This looks up the <file>(s) in the index and, if there are any merge
16 entries, passes the SHA1 hash for those files as arguments 1, 2, 3 (empty
17 argument if no file), and <file> as argument 4. File modes for the three
18 files are passed as arguments 5, 6 and 7.
19
20 OPTIONS
21 -------
1bb569e Autogenerated HTML docs for v1.3.2-g8611
Junio C Hamano authored
22 \--::
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
23 Do not interpret any more arguments as options.
24
25 -a::
26 Run merge against all files in the index that need merging.
27
28 -o::
29 Instead of stopping at the first failed merge, do all of them
30 in one shot - continue with merging even when previous merges
31 returned errors, and only return the error code after all the
ec87f52 Autogenerated HTML docs for v1.6.1-rc2-14-g5363d
Junio C Hamano authored
32 merges.
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
33
34 -q::
ec87f52 Autogenerated HTML docs for v1.6.1-rc2-14-g5363d
Junio C Hamano authored
35 Do not complain about a failed merge program (a merge program
36 failure usually indicates conflicts during the merge). This is for
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
37 porcelains which might want to emit custom messages.
38
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
39 If 'git-merge-index' is called with multiple <file>s (or -a) then it
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
40 processes them in turn only stopping if merge returns a non-zero exit
41 code.
42
764a667 Autogenerated HTML docs for v1.5.3.4-319-gdd817
Junio C Hamano authored
43 Typically this is run with a script calling git's imitation of
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
44 the 'merge' command from the RCS package.
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
45
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
46 A sample script called 'git-merge-one-file' is included in the
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
47 distribution.
48
49 ALERT ALERT ALERT! The git "merge object order" is different from the
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
50 RCS 'merge' program merge object order. In the above ordering, the
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
51 original is first. But the argument order to the 3-way merge program
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
52 'merge' is to have the original in the middle. Don't ask me why.
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
53
54 Examples:
55
fce7c7e Autogenerated HTML docs for v1.5.6.1-156-ge903b
Junio C Hamano authored
56 torvalds@ppc970:~/merge-test> git merge-index cat MM
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
57 This is MM from the original tree. # original
58 This is modified MM in the branch A. # merge1
59 This is modified MM in the branch B. # merge2
60 This is modified MM in the branch B. # current contents
61
a77a513 Autogenerated HTML docs for v1.5.2.1-144-gabc40
Junio C Hamano authored
62 or
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
63
fce7c7e Autogenerated HTML docs for v1.5.6.1-156-ge903b
Junio C Hamano authored
64 torvalds@ppc970:~/merge-test> git merge-index cat AA MM
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
65 cat: : No such file or directory
66 This is added AA in the branch A.
67 This is added AA in the branch B.
68 This is added AA in the branch B.
69 fatal: merge program failed
70
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
71 where the latter example shows how 'git-merge-index' will stop trying to
fce7c7e Autogenerated HTML docs for v1.5.6.1-156-ge903b
Junio C Hamano authored
72 merge once anything has returned an error (i.e., `cat` returned an error
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
73 for the AA file, because it didn't exist in the original, and thus
ba4b928 Autogenerated HTML docs for v1.5.6.2-212-g08b5
Junio C Hamano authored
74 'git-merge-index' didn't even try to merge the MM thing).
1a4e841 Autogenerated HTML docs for 36de72aa9dc3b7daf8cf2770c840f39bb0d2ae70
Junio C Hamano authored
75
76 Author
77 ------
78 Written by Linus Torvalds <torvalds@osdl.org>
79 One-shot merge by Petr Baudis <pasky@ucw.cz>
80
81 Documentation
82 --------------
83 Documentation by David Greaves, Junio C Hamano and the git-list <git@vger.kernel.org>.
84
85 GIT
86 ---
f7c042d Autogenerated HTML docs for v1.5.6-rc1-21-g03300
Junio C Hamano authored
87 Part of the linkgit:git[1] suite
Something went wrong with that request. Please try again.