{"thread":{"id":"15440","subject":"using merge subtree and move it..","startedAt":"2008-09-09T00:21:10Z","lastAt":"2009-11-03T02:57:15Z","messageCount":4,"participants":["SungHyun Nam","Johannes Sixt","Milos Jakubicek"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"90152","messageId":"ga4fho$5ib$1@ger.gmane.org","threadId":"15440","inReplyTo":null,"subject":"using merge subtree and move it..","fromName":"SungHyun Nam","fromEmail":"namsh@posdata.co.kr","sentAt":"2008-09-09T00:21:10Z","receivedAt":"2008-09-09T00:21:10Z","isPatch":false,"sender":{"key":"namsh@posdata.co.kr","avatar":null},"body":"Hello,\n\nI used the subtree merge strategy. And then I moved the directory.\nNow, can I use subtree merge for that new directory?\n\nI just tried 'read-tree'.. (klib was in 'libs/klib').\n\n$ git read-tree --prefix=klib/ -u klib/master\nerror: Entry 'klib/Makefile' overlaps with 'klib/Makefile'.  Cannot bind.\n\nHmm.. just tried subtree merge..\n\n$ git pull -s subtree klib master\nremote: Counting objects: 5, done.\nremote: Compressing objects: 100% (2/2), done.\nremote: Total 3 (delta 1), reused 0 (delta 0)\nUnpacking objects: 100% (3/3), done.\n From ssh://192.168.10.10/git/libs/klib\n  * branch            master     -> FETCH_HEAD\nerror: Entry 'klib/klib.c' not uptodate. Cannot merge.\nfatal: merging of trees 31dd1721641a25bfb0225138a34c43483d870377 and \nbccba7da98b042817fdbd92c62b706919216b571 failed\nMerge with strategy subtree failed.\n\nThanks,\nnamsh\n"},{"id":"90173","messageId":"48C61E1F.6000907@viscovery.net","threadId":"15440","inReplyTo":"ga4fho$5ib$1@ger.gmane.org","subject":"Re: using merge subtree and move it..","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-09-09T06:56:31Z","receivedAt":"2008-09-09T06:56:31Z","isPatch":false,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"SungHyun Nam schrieb:\n> I used the subtree merge strategy. And then I moved the directory.\n> Now, can I use subtree merge for that new directory?\n\nSure. It should work just fine.\n\n> $ git pull -s subtree klib master\n> remote: Counting objects: 5, done.\n> remote: Compressing objects: 100% (2/2), done.\n> remote: Total 3 (delta 1), reused 0 (delta 0)\n> Unpacking objects: 100% (3/3), done.\n> From ssh://192.168.10.10/git/libs/klib\n>  * branch            master     -> FETCH_HEAD\n> error: Entry 'klib/klib.c' not uptodate. Cannot merge.\n\nYour problem is not related to subtree merge. Make sure you have no\nchanges to commit before you merge.\n\n> fatal: merging of trees 31dd1721641a25bfb0225138a34c43483d870377 and\n> bccba7da98b042817fdbd92c62b706919216b571 failed\n> Merge with strategy subtree failed.\n\n-- Hannes\n"},{"id":"90197","messageId":"48C64911.4020202@posdata.co.kr","threadId":"15440","inReplyTo":"48C61E1F.6000907@viscovery.net","subject":"Re: using merge subtree and move it..","fromName":"SungHyun Nam","fromEmail":"namsh@posdata.co.kr","sentAt":"2008-09-09T09:59:45Z","receivedAt":"2008-09-09T09:59:45Z","isPatch":false,"sender":{"key":"namsh@posdata.co.kr","avatar":null},"body":"Johannes Sixt wrote:\n> SungHyun Nam schrieb:\n>> I used the subtree merge strategy. And then I moved the directory.\n>> Now, can I use subtree merge for that new directory?\n> \n> Sure. It should work just fine.\n> \n>> $ git pull -s subtree klib master\n>> remote: Counting objects: 5, done.\n>> remote: Compressing objects: 100% (2/2), done.\n>> remote: Total 3 (delta 1), reused 0 (delta 0)\n>> Unpacking objects: 100% (3/3), done.\n>> From ssh://192.168.10.10/git/libs/klib\n>>  * branch            master     -> FETCH_HEAD\n>> error: Entry 'klib/klib.c' not uptodate. Cannot merge.\n> \n> Your problem is not related to subtree merge. Make sure you have no\n> changes to commit before you merge.\n\nIt seems I forgot to commit after running 'git mv lib/klib klib'.\nOops! :( I'm not sure because the problem gone after I did some\nstupid things.  The 'some stupid things' include 'git rm -rf klib;\n...; git remote rm klib and re-doing using-merge-subtree.....'.\n\nBTW, I have no idea how I can push 'local changes in subtree' to remote.\nThe 'Additional tips' in using-merge-subtree.txt said it is\npossible using subtree. But don't know how? Could someone show me\na sample command/setup sequence?\n\nThanks,\nnamsh\n"},{"id":"126620","messageId":"1257217035802-3936273.post@n2.nabble.com","threadId":"15440","inReplyTo":"48C64911.4020202@posdata.co.kr","subject":"Re: using merge subtree and move it..","fromName":"Milos Jakubicek","fromEmail":"xjakub@fi.muni.cz","sentAt":"2009-11-03T02:57:15Z","receivedAt":"2009-11-03T02:57:15Z","isPatch":false,"sender":{"key":"xjakub@fi.muni.cz","avatar":null},"body":"\n\n\nSungHyun Nam wrote:\n> \n> \n> BTW, I have no idea how I can push 'local changes in subtree' to remote.\n> The 'Additional tips' in using-merge-subtree.txt said it is\n> possible using subtree. But don't know how? Could someone show me\n> a sample command/setup sequence?\n> \n\nI found out: \nedit your .git/config file and in the [remote \"remotename\"] section, copy\nthe \"fetch =\" line as \"push =\" line (with same content after \"=\"). Then by\n\"git push remotename\" you'll just push the relevant subtree.\n-- \nView this message in context: http://n2.nabble.com/using-merge-subtree-and-move-it-tp1076542p3936273.html\nSent from the git mailing list archive at Nabble.com.\n"}]}