+You would normally use "git-merge-cache" with supplied
+"git-merge-one-file-script" to do this last step. The script
+does not touch the files in the work tree, and the entire merge
+happens in the index file. In other words, there is no need to
+worry about what is in the working directory, since it is never
+shown and never used.
+
+When you start a 3-way merge with an index file that is already
+populated, it is assumed that it represents the state of the
+files in your work tree, and you can even have files with
+changes unrecorded in the index file. It is further assumed
+that this state is "derived" from the stage 2 tree. The 3-way
+merge refuses to run if it finds an entry in the original index
+file that does not match stage 2.
+
+This is done to prevent you from losing your work-in-progress
+changes. To illustrate, suppose you start from what has been
+commited last to your repository:
+
+ $ JC=`cat .git/HEAD`
+ $ git-checkout-cache -f -u -a $JC
+
+You do random edits, without running git-update-cache. And then
+you notice that the tip of your "upstream" tree has advanced
+since you pulled from him:
+
+ $ git-fetch-script rsync://.... linus
+ $ LT=`cat .git/MERGE_HEAD`
+
+Your work tree is still based on your HEAD ($JC), but you have
+some edits since. Three-way merge makes sure that you have not
+added or modified cache entries since $JC, and if you haven't,
+then does the right thing. So with the following sequence:
+
+ $ git-read-tree -m -u `git-merge-base $JC $LT` $JC $LT
+ $ git-merge-cache git-merge-one-file-script -a
+ $ echo "Merge with Linus" | \
+ git-commit-tree `git-write-tree` -p $JC -p $LT
+
+what you would commit is a pure merge between $JC and LT without
+your work-in-progress changes, and your work tree would be
+updated to the result of the merge.
+