From: Rogan Dawes <lists@dawes.za.net>
To: Caleb Cushing <xenoterracide@gmail.com>
Cc: Sitaram Chamarty <sitaramc@gmail.com>, git@vger.kernel.org
Subject: Re: merge smart enough to adapt to renames?
Date: Fri, 20 Feb 2009 09:24:12 +0200 [thread overview]
Message-ID: <499E5A9C.6090900@dawes.za.net> (raw)
In-Reply-To: <81bfc67a0902191817u11361d0bw1f2215a53e284f8f@mail.gmail.com>
Caleb Cushing wrote:
>> Not sure I understood this completely, but I've found it
>> helps to make the rename/move as a separate commit, then
>> start changing stuff. In other words, do too many things in
>> the same commit, and you could lose this coolness.
>
> well I the problem is.. in a sense I need to unmerge 2 files that I
> once merged... they currently have the same name and are in the same
> place, and where I merge them from they'll continue to have that name
> (although they are different files with the same purpose) but I want
> them to have different names and spots in my tree/repo.
>
Not having done this myself, I'd take this following suggestion with a
grain of salt! :-)
It seems to me that git is smart enough to figure out where contents get
moved to, once. Of course, if you have conflicting moves in the same
repo, git's automation falls down. So, if you need to move the "same"
file in different repositories to different places, you need to do it
via an intermediate repo that will be able to "remember" which movement
you chose.
e.g.
upstream A:
data <- contains one set of data
upstream B:
data <- contains another set of data
pull upstream A into intermediate A, move the file as desired, and commit:
Intermediate A:
data/upstreamA
pull upstream B into intermediate B, move the file as desired, and commit:
Intermediate B:
data/upstreamB
merge Intermediate A and Intermediate B in master:
master:
data/upstreamA
data/upstreamB
Then, subsequent pulling from upstream A into Intermediate A will
"remember" the move of "data" to "data/upstreamA", and similarly with B.
Subsequent merges of Intermediates A & B into master will end in the
desied result.
Hope this helps.
Rogan
next prev parent reply other threads:[~2009-02-20 7:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-19 6:12 merge smart enough to adapt to renames? Caleb Cushing
2009-02-19 14:25 ` Sitaram Chamarty
2009-02-19 19:58 ` Caleb Cushing
2009-02-20 0:36 ` Sitaram Chamarty
2009-02-20 2:17 ` Caleb Cushing
2009-02-20 7:24 ` Rogan Dawes [this message]
2009-02-21 4:48 ` Kris Shannon
2009-02-21 11:12 ` Rogan Dawes
2009-02-22 1:00 ` Caleb Cushing
2009-02-22 17:13 ` Rogan Dawes
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=499E5A9C.6090900@dawes.za.net \
--to=lists@dawes.za.net \
--cc=git@vger.kernel.org \
--cc=sitaramc@gmail.com \
--cc=xenoterracide@gmail.com \
/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).