{"thread":{"id":"22285","subject":"How to resolve conflict: Moved away vs. created new file with same name","startedAt":"2010-01-19T11:10:32Z","lastAt":"2010-01-19T16:46:37Z","messageCount":4,"participants":["Johannes Schneider","Johannes Sixt"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"132093","messageId":"4B559328.2010206@cedarsoft.com","threadId":"22285","inReplyTo":null,"subject":"How to resolve conflict: Moved away vs. created new file with same name","fromName":"Johannes Schneider","fromEmail":"mailings@cedarsoft.com","sentAt":"2010-01-19T11:10:32Z","receivedAt":"2010-01-19T11:10:32Z","isPatch":false,"sender":{"key":"mailings@cedarsoft.com","avatar":null},"body":"Hi,\n\nI had the following merge problem that I could not solve.\n\n\nTopicA:\n\ncreated a directory \"client\" containing a pom.xml and several source files.\n\n\nTopicB:\n\ncreated a directory \"client\" containing a pom.xml (different file than \nthe one in TopicA).\nCreated several subdirectories (client1, client2).\n\n\nYou get the idea? I introduce several different clients and want them to \nbe stored within one directory. But I did not have this idea when I have \nstarted TopicA.\n\n\nSo I am trying to mimic the change in TopicA:\n\ncd client\nmkdir client3\nmv pom.xml client3\nmv src client3\n...commit...\n\n\nOkay, so far so good. Now I try to merge TopicA and TopicB which fails. \nOf course Git doesn't understand that \"client/pom.xml\" in TopicA and \nTopicB are not related.\nI want to end with to the file from TopicA ending in \n\"client/client3/pom.xml\" and the file from TopicB in \"client/pom.xml\".\n\nI don't blame Git for not knowing what I want. I just wanna ask how I \nshould tell Git what I want? Any hints?\n\n\nThanks,\n\nJohannes\n"},{"id":"132094","messageId":"4B559DAB.9030605@viscovery.net","threadId":"22285","inReplyTo":"4B559328.2010206@cedarsoft.com","subject":"Re: How to resolve conflict: Moved away vs. created new file with same name","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-01-19T11:55:23Z","receivedAt":"2010-01-19T11:55:23Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Johannes Schneider schrieb:\n> TopicA:\n> \n> created a directory \"client\" containing a pom.xml and several source files.\n> \n> \n> TopicB:\n> \n> created a directory \"client\" containing a pom.xml (different file than\n> the one in TopicA).\n> Created several subdirectories (client1, client2).\n> \n> ...\n> So I am trying to mimic the change in TopicA:\n> \n> cd client\n> mkdir client3\n> mv pom.xml client3\n> mv src client3\n> ...commit...\n\nDid you do this during the merge? If not, go back to TopicA and redo it;\nthen you avoid the conflict during the merge.\n\n> Okay, so far so good. Now I try to merge TopicA and TopicB which fails.\n> Of course Git doesn't understand that \"client/pom.xml\" in TopicA and\n> TopicB are not related.\n> I want to end with to the file from TopicA ending in\n> \"client/client3/pom.xml\" and the file from TopicB in \"client/pom.xml\".\n\nDuring the merge without the fixup suggested above:\n\ngit rm -f client/client3/pom.xml\ngit checkout TopicA -- client/pom.xml\ngit mv client/pom.xml client/client3/pom.xml\ngit checkout TopicB -- client/pom.xml\n\nbut it leaves you with an ugly history, and it would be far better to fix\nup TopicA before the merge.\n\n-- Hannes\n"},{"id":"132107","messageId":"4B55C7E0.7030604@viscovery.net","threadId":"22285","inReplyTo":"4B55C481.90406@cedarsoft.com","subject":"Re: How to resolve conflict: Moved away vs. created new file with same name","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-01-19T14:55:28Z","receivedAt":"2010-01-19T14:55:28Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Please keep the discussion on the list. I'm not your personal support dude.\n\nJohannes Schneider schrieb:\n> On 01/19/2010 12:55 PM, Johannes Sixt wrote:\n>>> So I am trying to mimic the change in TopicA:\n>>>\n>>> cd client\n>>> mkdir client3\n>>> mv pom.xml client3\n>>> mv src client3\n>>> ...commit...\n>>\n>> Did you do this during the merge? If not, go back to TopicA and redo it;\n>> then you avoid the conflict during the merge.\n> \n> Yes, I have done this in TopicA *before* the merge. I knew that there\n> will be conflicting directories and tried to clean that up before.\n> \n>> During the merge without the fixup suggested above:\n>>\n>> git rm -f client/client3/pom.xml\n>> git checkout TopicA -- client/pom.xml\n>> git mv client/pom.xml client/client3/pom.xml\n>> git checkout TopicB -- client/pom.xml\n>>\n>> but it leaves you with an ugly history, and it would be far better to fix\n>> up TopicA before the merge.\n> \n> Yep. I prefer a clean history ;-). So do you know how to solve that\n> issue with a cleaned up TopicA branch?\n\nI don't see an issue if you have cleaned up TopicA. Where is it? Did you\nreally do what you said you did?\n\n-- Hannes\n"},{"id":"132117","messageId":"4B55E1ED.7090100@cedarsoft.com","threadId":"22285","inReplyTo":"4B55C7E0.7030604@viscovery.net","subject":"Re: How to resolve conflict: Moved away vs. created new file with same name","fromName":"Johannes Schneider","fromEmail":"mailings@cedarsoft.com","sentAt":"2010-01-19T16:46:37Z","receivedAt":"2010-01-19T16:46:37Z","isPatch":false,"sender":{"key":"mailings@cedarsoft.com","avatar":null},"body":"On 01/19/2010 03:55 PM, Johannes Sixt wrote:\n> Please keep the discussion on the list. I'm not your personal support dude.\n\nSorry, unintentional. TB3 has a menu entry called \"reply to list\" that \nobviously does not what I expected from...\n\n>\n> Johannes Schneider schrieb:\n>> On 01/19/2010 12:55 PM, Johannes Sixt wrote:\n>>>> So I am trying to mimic the change in TopicA:\n>>>>\n>>>> cd client\n>>>> mkdir client3\n>>>> mv pom.xml client3\n>>>> mv src client3\n>>>> ...commit...\n>>>\n>>> Did you do this during the merge? If not, go back to TopicA and redo it;\n>>> then you avoid the conflict during the merge.\n>>\n>> Yes, I have done this in TopicA *before* the merge. I knew that there\n>> will be conflicting directories and tried to clean that up before.\n>>\n>>> During the merge without the fixup suggested above:\n>>>\n>>> git rm -f client/client3/pom.xml\n>>> git checkout TopicA -- client/pom.xml\n>>> git mv client/pom.xml client/client3/pom.xml\n>>> git checkout TopicB -- client/pom.xml\n>>>\n>>> but it leaves you with an ugly history, and it would be far better to fix\n>>> up TopicA before the merge.\n>>\n>> Yep. I prefer a clean history ;-). So do you know how to solve that\n>> issue with a cleaned up TopicA branch?\n>\n> I don't see an issue if you have cleaned up TopicA. Where is it? Did you\n> really do what you said you did?\n>\n> -- Hannes\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"}]}