logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

git-merge-index.1 (3963B)


  1. '\" t
  2. .\" Title: git-merge-index
  3. .\" Author: [FIXME: author] [see http://www.docbook.org/tdg5/en/html/author]
  4. .\" Generator: DocBook XSL Stylesheets v1.79.2 <http://docbook.sf.net/>
  5. .\" Date: 2025-03-14
  6. .\" Manual: Git Manual
  7. .\" Source: Git 2.49.0
  8. .\" Language: English
  9. .\"
  10. .TH "GIT\-MERGE\-INDEX" "1" "2025-03-14" "Git 2\&.49\&.0" "Git Manual"
  11. .\" -----------------------------------------------------------------
  12. .\" * Define some portability stuff
  13. .\" -----------------------------------------------------------------
  14. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  15. .\" http://bugs.debian.org/507673
  16. .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
  17. .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18. .ie \n(.g .ds Aq \(aq
  19. .el .ds Aq '
  20. .\" -----------------------------------------------------------------
  21. .\" * set default formatting
  22. .\" -----------------------------------------------------------------
  23. .\" disable hyphenation
  24. .nh
  25. .\" disable justification (adjust text to left margin only)
  26. .ad l
  27. .\" -----------------------------------------------------------------
  28. .\" * MAIN CONTENT STARTS HERE *
  29. .\" -----------------------------------------------------------------
  30. .SH "NAME"
  31. git-merge-index \- Run a merge for files needing merging
  32. .SH "SYNOPSIS"
  33. .sp
  34. .nf
  35. \fIgit merge\-index\fR [\-o] [\-q] <merge\-program> (\-a | ( [\-\-] <file>\&...\:) )
  36. .fi
  37. .SH "DESCRIPTION"
  38. .sp
  39. This looks up the <file>(s) in the index and, if there are any merge entries, passes the SHA\-1 hash for those files as arguments 1, 2, 3 (empty argument if no file), and <file> as argument 4\&. File modes for the three files are passed as arguments 5, 6 and 7\&.
  40. .SH "OPTIONS"
  41. .PP
  42. \-\-
  43. .RS 4
  44. Do not interpret any more arguments as options\&.
  45. .RE
  46. .PP
  47. \-a
  48. .RS 4
  49. Run merge against all files in the index that need merging\&.
  50. .RE
  51. .PP
  52. \-o
  53. .RS 4
  54. Instead of stopping at the first failed merge, do all of them in one shot \- continue with merging even when previous merges returned errors, and only return the error code after all the merges\&.
  55. .RE
  56. .PP
  57. \-q
  58. .RS 4
  59. Do not complain about a failed merge program (a merge program failure usually indicates conflicts during the merge)\&. This is for porcelains which might want to emit custom messages\&.
  60. .RE
  61. .sp
  62. If \fIgit merge\-index\fR is called with multiple <file>s (or \-a) then it processes them in turn only stopping if merge returns a non\-zero exit code\&.
  63. .sp
  64. Typically this is run with a script calling Git\(cqs imitation of the \fImerge\fR command from the RCS package\&.
  65. .sp
  66. A sample script called \fIgit merge\-one\-file\fR is included in the distribution\&.
  67. .sp
  68. ALERT ALERT ALERT! The Git "merge object order" is different from the RCS \fImerge\fR program merge object order\&. In the above ordering, the original is first\&. But the argument order to the 3\-way merge program \fImerge\fR is to have the original in the middle\&. Don\(cqt ask me why\&.
  69. .sp
  70. Examples:
  71. .sp
  72. .if n \{\
  73. .RS 4
  74. .\}
  75. .nf
  76. torvalds@ppc970:~/merge\-test> git merge\-index cat MM
  77. This is MM from the original tree\&. # original
  78. This is modified MM in the branch A\&. # merge1
  79. This is modified MM in the branch B\&. # merge2
  80. This is modified MM in the branch B\&. # current contents
  81. .fi
  82. .if n \{\
  83. .RE
  84. .\}
  85. .sp
  86. or
  87. .sp
  88. .if n \{\
  89. .RS 4
  90. .\}
  91. .nf
  92. torvalds@ppc970:~/merge\-test> git merge\-index cat AA MM
  93. cat: : No such file or directory
  94. This is added AA in the branch A\&.
  95. This is added AA in the branch B\&.
  96. This is added AA in the branch B\&.
  97. fatal: merge program failed
  98. .fi
  99. .if n \{\
  100. .RE
  101. .\}
  102. .sp
  103. where the latter example shows how \fIgit merge\-index\fR will stop trying to merge once anything has returned an error (i\&.e\&., \fBcat\fR returned an error for the AA file, because it didn\(cqt exist in the original, and thus \fIgit merge\-index\fR didn\(cqt even try to merge the MM thing)\&.
  104. .SH "GIT"
  105. .sp
  106. Part of the \fBgit\fR(1) suite