From: Chris Packham <judge.packham@gmail.com>
To: GIT <git@vger.kernel.org>
Subject: re-running merge on a single file
Date: Thu, 11 Mar 2010 10:54:05 -0800 [thread overview]
Message-ID: <a038bef51003111054n5bcecd2eud531dcc80509f952@mail.gmail.com> (raw)
Hi List,
I'm in the middle of updating our copy of another projects repository.
So far its been OK, we haven't diverged too much so it was a fairly
simple operation to add the projects repository as a 'vendor' remote
and get git merge to do most of the heavy lifting then use git merge
tool to fix up the things that git merge couldn't resolve. So right
now I have a history something like this.
-o-o-o-o-o master
\ \
\ m update
\ /
\-o-o-o vendor
Now I'm finding that when I first used git mergetool for some things I
messed up and need to fix the code. In some cases this is because some
naming schemes changed in the vendor branch so I need to make
equivalent changes to the code we've added, no problem thats just more
commits on the update branch. 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.
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 checkout master -- file
mv file file.ours
git checkout vendor -- file
mv file file.theirs
kdiff3 file.base file.ours file.theirs -o file
---
Thanks,
Chris
next reply other threads:[~2010-03-11 18:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 18:54 Chris Packham [this message]
2010-03-11 19:09 ` re-running merge on a single file Chris Packham
2010-03-11 20:29 ` Markus Heidelberg
2010-03-11 22:08 ` Chris Packham
2010-03-11 23:20 ` Jakub Narebski
[not found] ` <a038bef51003111631n38f7e50cp79d8335109f3ed0@mail.gmail.com>
2010-03-12 0:33 ` Chris Packham
2010-03-12 6:45 ` Johannes Sixt
2010-03-12 6:56 ` Junio C Hamano
2010-03-12 20:16 ` Chris Packham
2010-03-12 21:16 ` Chris Packham
2010-03-12 23:07 ` Junio C Hamano
2010-03-12 23:43 ` Chris Packham
2010-03-14 12:24 ` Kris Shannon
2010-03-12 9:00 ` Jakub Narebski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a038bef51003111054n5bcecd2eud531dcc80509f952@mail.gmail.com \
--to=judge.packham@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).