If you mean "prior to merging", i.e., you want a "git merge --into master",
you can do it this way:
# we are on branch 'topic' here
git checkout HEAD^0 # detach
git merge master
git reset --soft master # keep index(!!!) and worktree
git checkout master # re-attach
git merge topic
The point is that the second merge will succeed even with a dirty index
because for each file the result of the merge is identical to the index!
If you have conflicts during the merge, resolve them in the first merge and
commit to prime the rerere database; the second merge will fail for each
conflicting file; just 'git checkout HEAD -- the/conflicting/file' and retry.
rerere will resolve the conflicts for you.
You can of course get away with only one merge, but then you will have to do
extra work to switch the parents around and to fix the commit message.
-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html