flag. When used with `-m`, the `-u` flag causes it to also update
the files in the work tree with the result of the merge.
flag. When used with `-m`, the `-u` flag causes it to also update
the files in the work tree with the result of the merge.
-Trivial merges are done by 'git-read-tree' itself. Only conflicting paths
-will be in unmerged state when 'git-read-tree' returns.
+Trivial merges are done by 'git read-tree' itself. Only conflicting paths
+will be in unmerged state when 'git read-tree' returns.
only if there is no file-level merging required, instead
of resolving merge for trivial cases and leaving
conflicting files unresolved in the index.
--aggressive::
only if there is no file-level merging required, instead
of resolving merge for trivial cases and leaving
conflicting files unresolved in the index.
--aggressive::
the merge for really trivial cases and leaves other
cases unresolved in the index, so that Porcelains can
implement different merge policies. This flag makes the
the merge for really trivial cases and leaves other
cases unresolved in the index, so that Porcelains can
implement different merge policies. This flag makes the
merge, a single tree merge if only 1 tree is given, a
fast-forward merge with 2 trees, or a 3-way merge if 3 trees are
provided.
merge, a single tree merge if only 1 tree is given, a
fast-forward merge with 2 trees, or a 3-way merge if 3 trees are
provided.
specify `-m`, except that if the original index has an entry for a
given pathname, and the contents of the path matches with the tree
being read, the stat info from the index is used. (In other words, the
index's stat()s take precedence over the merged tree's).
That means that if you do a `git read-tree -m <newtree>` followed by a
specify `-m`, except that if the original index has an entry for a
given pathname, and the contents of the path matches with the tree
being read, the stat info from the index is used. (In other words, the
index's stat()s take precedence over the merged tree's).
That means that if you do a `git read-tree -m <newtree>` followed by a
In all "keep index" cases, the index entry stays as in the
original index file. If the entry were not up to date,
In all "keep index" cases, the index entry stays as in the
original index file. If the entry were not up to date,
see what "local changes" you made are carried forward by running
`git diff-index --cached $M`. Note that this does not
necessarily match `git diff-index --cached $H` would have
see what "local changes" you made are carried forward by running
`git diff-index --cached $M`. Note that this does not
necessarily match `git diff-index --cached $H` would have
Each "index" entry has two bits worth of "stage" state. stage 0 is the
normal one, and is the only one you'd see in any kind of normal use.
Each "index" entry has two bits worth of "stage" state. stage 0 is the
normal one, and is the only one you'd see in any kind of normal use.
a file that matches in all respects in the following states, it
"collapses" back to "stage0":
a file that matches in all respects in the following states, it
"collapses" back to "stage0":
- stage 1 and stage 3 are the same and stage 2 is different take
stage 2 (we did something while they did nothing)
- stage 1 and stage 3 are the same and stage 2 is different take
stage 2 (we did something while they did nothing)
populated. Here is an outline of how the algorithm works:
- if a file exists in identical format in all three trees, it will
populated. Here is an outline of how the algorithm works:
- if a file exists in identical format in all three trees, it will
- a file that has _any_ difference what-so-ever in the three trees
will stay as separate entries in the index. It's up to "porcelain
- a file that has _any_ difference what-so-ever in the three trees
will stay as separate entries in the index. It's up to "porcelain
-You would normally use 'git-merge-index' with supplied
-'git-merge-one-file' to do this last step. The script updates
+You would normally use 'git merge-index' with supplied
+'git merge-one-file' to do this last step. The script updates
updated to the result of the merge.
However, if you have local changes in the working tree that
updated to the result of the merge.
However, if you have local changes in the working tree that
to run to prevent your changes from being lost.
In other words, there is no need to worry about what exists only
in the working tree. When you have local changes in a part of
the project that is not involved in the merge, your changes do
not interfere with the merge, and are kept intact. When they
to run to prevent your changes from being lost.
In other words, there is no need to worry about what exists only
in the working tree. When you have local changes in a part of
the project that is not involved in the merge, your changes do
not interfere with the merge, and are kept intact. When they
complains loudly and fails without modifying anything). In such
a case, you can simply continue doing what you were in the
middle of doing, and when your working tree is ready (i.e. you
complains loudly and fails without modifying anything). In such
a case, you can simply continue doing what you were in the
middle of doing, and when your working tree is ready (i.e. you