{"thread":{"id":"13365","subject":"Trouble merging to master when topic branch has a dir added","startedAt":"2008-05-03T13:51:46Z","lastAt":"2008-05-05T14:27:14Z","messageCount":2,"participants":["Frodo Baggins","Jeremy Ramer"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"75922","messageId":"1cdff3fa0805030651j5d1936bdh4f7999163b7444ba@mail.gmail.com","threadId":"13365","inReplyTo":null,"subject":"Trouble merging to master when topic branch has a dir added","fromName":"Frodo Baggins","fromEmail":"frodo.drogo@gmail.com","sentAt":"2008-05-03T13:51:46Z","receivedAt":"2008-05-03T13:51:46Z","isPatch":false,"sender":{"key":"frodo.drogo@gmail.com","avatar":null},"body":"Hi,\nThis is a newbie question.\n\nI created a topic branch and made a few commits which added a few\ndirectories. I'd like to merge these changes back to master.\nI get the following error messages.\n\nfrodo@laptop-zion:~/src/c/logger$ ls\nlogger-inc  logger-src  Makefile  test-driver\nfrodo@laptop-zion:~/src/c/logger$ git branch\n  debug-printf-help\n  debug-static\n  master\n* split-into-dirs\nfrodo@laptop-zion:~/src/c/logger$ git checkout master\nfatal: Entry 'logger-src/logger.cpp' would be overwritten by merge.\nCannot merge.\n\nI think the above error is due to the fact that the branch master did\nnot have these directories.\n\nfrodo@laptop-zion:~/src/c/logger$ git-ls-tree master\n100644 blob 82ccb7971fc36db2bc54bb5a590f97cd37c998fb    .gitignore\n100644 blob 9971a5a432d575cc682145454e5260f83e1b9fb3    Makefile\n100644 blob b8f6c213ebb831ed8704b7f0e0e665212b808649    client.cpp\n100644 blob d01aaec4138862ccae4be9de2c672ddaeccfa21d    logger.cpp\n100644 blob 37c15a22b325934ea685a76cfd528c2bf6464f2b    logger.h\nfrodo@laptop-zion:~/src/c/logger$ git-ls-tree split-into-dirs\n100644 blob 82ccb7971fc36db2bc54bb5a590f97cd37c998fb    .gitignore\n100644 blob 7c497aff60175ce212415c1737e224f517f785e9    Makefile\n040000 tree 4f181412688afaa30929b752cc1fb3f2cda3cba9    logger-inc\n       <=== new dir\n040000 tree 4fb363dac2a00d93d1a958f74021fcd0e3bc861e    logger-src\n      <===\n040000 tree bb2b91b6ec1d11d23ab8e7a3c8935504079f6bf3    test-driver         <===\n\n\nCould someone help me out with this?\nfrodo@laptop-zion:~/src/c/logger$ git --version\ngit version 1.5.2.5\n\nRegards,\nFrodo B\n-- \nNever laugh at live dragons.\n                              -- Bilbo Baggins\n"},{"id":"76129","messageId":"b9fd99020805050727o54cb9af2o3b43257fb32aac60@mail.gmail.com","threadId":"13365","inReplyTo":"1cdff3fa0805030651j5d1936bdh4f7999163b7444ba@mail.gmail.com","subject":"Re: Trouble merging to master when topic branch has a dir added","fromName":"Jeremy Ramer","fromEmail":"jdramer@gmail.com","sentAt":"2008-05-05T14:27:14Z","receivedAt":"2008-05-05T14:27:14Z","isPatch":false,"sender":{"key":"jdramer@gmail.com","avatar":null},"body":"It looks like there is some uncommitted changes in the file\nlogger-src/logger.cpp.  You cannot switch to the master branch because\nit has no knowledge of that file so any uncommitted changes will be\nlost.  If the changes are important you should commit them first (to a\nside branch if you don't want them to be part of the merge) or if\nuseless you can remove them with\ngit checkout HEAD logger-src/logger.cpp\n\nOn Sat, May 3, 2008 at 7:51 AM, Frodo Baggins <frodo.drogo@gmail.com> wrote:\n> Hi,\n>  This is a newbie question.\n>\n>  I created a topic branch and made a few commits which added a few\n>  directories. I'd like to merge these changes back to master.\n>  I get the following error messages.\n>\n>  frodo@laptop-zion:~/src/c/logger$ ls\n>  logger-inc  logger-src  Makefile  test-driver\n>  frodo@laptop-zion:~/src/c/logger$ git branch\n>   debug-printf-help\n>   debug-static\n>   master\n>  * split-into-dirs\n>  frodo@laptop-zion:~/src/c/logger$ git checkout master\n>  fatal: Entry 'logger-src/logger.cpp' would be overwritten by merge.\n>  Cannot merge.\n>\n>  I think the above error is due to the fact that the branch master did\n>  not have these directories.\n>\n>  frodo@laptop-zion:~/src/c/logger$ git-ls-tree master\n>  100644 blob 82ccb7971fc36db2bc54bb5a590f97cd37c998fb    .gitignore\n>  100644 blob 9971a5a432d575cc682145454e5260f83e1b9fb3    Makefile\n>  100644 blob b8f6c213ebb831ed8704b7f0e0e665212b808649    client.cpp\n>  100644 blob d01aaec4138862ccae4be9de2c672ddaeccfa21d    logger.cpp\n>  100644 blob 37c15a22b325934ea685a76cfd528c2bf6464f2b    logger.h\n>  frodo@laptop-zion:~/src/c/logger$ git-ls-tree split-into-dirs\n>  100644 blob 82ccb7971fc36db2bc54bb5a590f97cd37c998fb    .gitignore\n>  100644 blob 7c497aff60175ce212415c1737e224f517f785e9    Makefile\n>  040000 tree 4f181412688afaa30929b752cc1fb3f2cda3cba9    logger-inc\n>        <=== new dir\n>  040000 tree 4fb363dac2a00d93d1a958f74021fcd0e3bc861e    logger-src\n>       <===\n>  040000 tree bb2b91b6ec1d11d23ab8e7a3c8935504079f6bf3    test-driver         <===\n>\n>\n>  Could someone help me out with this?\n>  frodo@laptop-zion:~/src/c/logger$ git --version\n>  git version 1.5.2.5\n>\n>  Regards,\n>  Frodo B\n>  --\n>  Never laugh at live dragons.\n>                               -- Bilbo Baggins\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>\n"}]}