* How to resolve conflict: Moved away vs. created new file with same name
@ 2010-01-19 11:10 Johannes Schneider
2010-01-19 11:55 ` Johannes Sixt
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schneider @ 2010-01-19 11:10 UTC (permalink / raw)
To: git
Hi,
I had the following merge problem that I could not solve.
TopicA:
created a directory "client" containing a pom.xml and several source files.
TopicB:
created a directory "client" containing a pom.xml (different file than
the one in TopicA).
Created several subdirectories (client1, client2).
You get the idea? I introduce several different clients and want them to
be stored within one directory. But I did not have this idea when I have
started TopicA.
So I am trying to mimic the change in TopicA:
cd client
mkdir client3
mv pom.xml client3
mv src client3
...commit...
Okay, so far so good. Now I try to merge TopicA and TopicB which fails.
Of course Git doesn't understand that "client/pom.xml" in TopicA and
TopicB are not related.
I want to end with to the file from TopicA ending in
"client/client3/pom.xml" and the file from TopicB in "client/pom.xml".
I don't blame Git for not knowing what I want. I just wanna ask how I
should tell Git what I want? Any hints?
Thanks,
Johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to resolve conflict: Moved away vs. created new file with same name
2010-01-19 11:10 How to resolve conflict: Moved away vs. created new file with same name Johannes Schneider
@ 2010-01-19 11:55 ` Johannes Sixt
[not found] ` <4B55C481.90406@cedarsoft.com>
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2010-01-19 11:55 UTC (permalink / raw)
To: Johannes Schneider; +Cc: git
Johannes Schneider schrieb:
> TopicA:
>
> created a directory "client" containing a pom.xml and several source files.
>
>
> TopicB:
>
> created a directory "client" containing a pom.xml (different file than
> the one in TopicA).
> Created several subdirectories (client1, client2).
>
> ...
> So I am trying to mimic the change in TopicA:
>
> cd client
> mkdir client3
> mv pom.xml client3
> mv src client3
> ...commit...
Did you do this during the merge? If not, go back to TopicA and redo it;
then you avoid the conflict during the merge.
> Okay, so far so good. Now I try to merge TopicA and TopicB which fails.
> Of course Git doesn't understand that "client/pom.xml" in TopicA and
> TopicB are not related.
> I want to end with to the file from TopicA ending in
> "client/client3/pom.xml" and the file from TopicB in "client/pom.xml".
During the merge without the fixup suggested above:
git rm -f client/client3/pom.xml
git checkout TopicA -- client/pom.xml
git mv client/pom.xml client/client3/pom.xml
git checkout TopicB -- client/pom.xml
but it leaves you with an ugly history, and it would be far better to fix
up TopicA before the merge.
-- Hannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to resolve conflict: Moved away vs. created new file with same name
[not found] ` <4B55C481.90406@cedarsoft.com>
@ 2010-01-19 14:55 ` Johannes Sixt
2010-01-19 16:46 ` Johannes Schneider
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Sixt @ 2010-01-19 14:55 UTC (permalink / raw)
To: Johannes Schneider; +Cc: Git Mailing List
Please keep the discussion on the list. I'm not your personal support dude.
Johannes Schneider schrieb:
> On 01/19/2010 12:55 PM, Johannes Sixt wrote:
>>> So I am trying to mimic the change in TopicA:
>>>
>>> cd client
>>> mkdir client3
>>> mv pom.xml client3
>>> mv src client3
>>> ...commit...
>>
>> Did you do this during the merge? If not, go back to TopicA and redo it;
>> then you avoid the conflict during the merge.
>
> Yes, I have done this in TopicA *before* the merge. I knew that there
> will be conflicting directories and tried to clean that up before.
>
>> During the merge without the fixup suggested above:
>>
>> git rm -f client/client3/pom.xml
>> git checkout TopicA -- client/pom.xml
>> git mv client/pom.xml client/client3/pom.xml
>> git checkout TopicB -- client/pom.xml
>>
>> but it leaves you with an ugly history, and it would be far better to fix
>> up TopicA before the merge.
>
> Yep. I prefer a clean history ;-). So do you know how to solve that
> issue with a cleaned up TopicA branch?
I don't see an issue if you have cleaned up TopicA. Where is it? Did you
really do what you said you did?
-- Hannes
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to resolve conflict: Moved away vs. created new file with same name
2010-01-19 14:55 ` Johannes Sixt
@ 2010-01-19 16:46 ` Johannes Schneider
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schneider @ 2010-01-19 16:46 UTC (permalink / raw)
To: Git Mailing List
On 01/19/2010 03:55 PM, Johannes Sixt wrote:
> Please keep the discussion on the list. I'm not your personal support dude.
Sorry, unintentional. TB3 has a menu entry called "reply to list" that
obviously does not what I expected from...
>
> Johannes Schneider schrieb:
>> On 01/19/2010 12:55 PM, Johannes Sixt wrote:
>>>> So I am trying to mimic the change in TopicA:
>>>>
>>>> cd client
>>>> mkdir client3
>>>> mv pom.xml client3
>>>> mv src client3
>>>> ...commit...
>>>
>>> Did you do this during the merge? If not, go back to TopicA and redo it;
>>> then you avoid the conflict during the merge.
>>
>> Yes, I have done this in TopicA *before* the merge. I knew that there
>> will be conflicting directories and tried to clean that up before.
>>
>>> During the merge without the fixup suggested above:
>>>
>>> git rm -f client/client3/pom.xml
>>> git checkout TopicA -- client/pom.xml
>>> git mv client/pom.xml client/client3/pom.xml
>>> git checkout TopicB -- client/pom.xml
>>>
>>> but it leaves you with an ugly history, and it would be far better to fix
>>> up TopicA before the merge.
>>
>> Yep. I prefer a clean history ;-). So do you know how to solve that
>> issue with a cleaned up TopicA branch?
>
> I don't see an issue if you have cleaned up TopicA. Where is it? Did you
> really do what you said you did?
>
> -- 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-01-19 16:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-19 11:10 How to resolve conflict: Moved away vs. created new file with same name Johannes Schneider
2010-01-19 11:55 ` Johannes Sixt
[not found] ` <4B55C481.90406@cedarsoft.com>
2010-01-19 14:55 ` Johannes Sixt
2010-01-19 16:46 ` Johannes Schneider
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).