Re: re-running merge on a single file
- Date: Thu, 11 Mar 2010 21:29:52 +0100
- From: Markus Heidelberg <markus.heidelberg@xxxxxx>
- Subject: Re: re-running merge on a single file
Chris Packham, 2010-03-11 19:54:
> In other cases I'm actually thinking
> that it'd be easier to ask git to try the merge again on that one
> file. I can ask git difftool to show me the pre-merge differences with
> 'git difftool master..vendor <file>' but what I'd really like to do is
> ask git mergetool to do something similar so I can re-do my manual
> merging.
Not mergetool, but checkout:
git checkout --merge -- file
> Alternatively I could manually drive and external merge tool like
> kdiff3 if I had a recipe for getting the common ancestor revision.
> Something like
>
> git checkout <magic pathspec> -- file
> mv file file.base
git cat-file blob :1:file > file.base
>
> git checkout master -- file
git checkout --ours -- file
> mv file file.ours
or
git cat-file blob :2:file > file.ours
> git checkout vendor -- file
git checkout --theirs -- file
> mv file file.theirs
or
git cat-file blob :3:file > file.theirs
> kdiff3 file.base file.ours file.theirs -o file
See the manpages of git-checkout and git-merge for these syntaxes.
Markus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html