{"thread":{"id":"7218","subject":".git inside a .git: is it safe?","startedAt":"2007-03-12T21:56:30Z","lastAt":"2007-03-14T15:02:26Z","messageCount":4,"participants":["Guilhem Bonnefille","Shawn O. Pearce","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"36962","messageId":"8b65902a0703121456s56008088ra14452ef7f325cf3@mail.gmail.com","threadId":"7218","inReplyTo":null,"subject":".git inside a .git: is it safe?","fromName":"Guilhem Bonnefille","fromEmail":"guilhem.bonnefille@gmail.com","sentAt":"2007-03-12T21:56:30Z","receivedAt":"2007-03-12T21:56:30Z","isPatch":false,"sender":{"key":"guilhem.bonnefille@gmail.com","avatar":"https://gravatar.com/avatar/375364bfee1f61197c540e37465abe3619fc24eb3a36b0edcea7f15b124036b0?d=mp&s=160"},"body":"Hi,\n\nI'm actually working on the packaging of a project. To do so, I use\ntwo Git repositories:\n- one to follow the main project\n- one to manage my updates on this project.\n\nBut, the matter is I cannot merge the both root. I need to have the\nmain project sources in a subdirectory of my own project. My workspace\nis as follow: myproject/sub/tree/mainproject\n\nWith SVN, I think such things are handled with svn:external.\n\nActually, with Git, I frequently copy the mainproject inside its\nsubtree in my workspace.\n\n\nBut, I recently discover that everything seems fine if I include the\nGit repo of mainproject inside the Git repo of my project. The layout\nlloks like this:\nmyproject\n|- .git\n|- sub\n  |- tree\n    |- mainproject\n      |- .git\n\n\nIt seems to work. But do you think such layout is \"safe\" ?\n\n-- \nGuilhem BONNEFILLE\n-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com\n-=- mailto:guilhem.bonnefille@gmail.com\n-=- http://nathguil.free.fr/\n"},{"id":"36963","messageId":"20070312221540.GA16545@spearce.org","threadId":"7218","inReplyTo":"8b65902a0703121456s56008088ra14452ef7f325cf3@mail.gmail.com","subject":"Re: .git inside a .git: is it safe?","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-12T22:15:40Z","receivedAt":"2007-03-12T22:15:40Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Guilhem Bonnefille <guilhem.bonnefille@gmail.com> wrote:\n> But, I recently discover that everything seems fine if I include the\n> Git repo of mainproject inside the Git repo of my project. The layout\n> lloks like this:\n> myproject\n> |- .git\n> |- sub\n>  |- tree\n>    |- mainproject\n>      |- .git\n> \n> \n> It seems to work. But do you think such layout is \"safe\" ?\n\nYes, that's fine.  You just probably want an entry in the top level\nproject (myproject) that says ignore the stuff under mainproject.\nThat way \"git add .\" in myproject doesn't include files in\nmainproject by accident.\n\n-- \nShawn.\n"},{"id":"36964","messageId":"et4lmo$nnj$1@sea.gmane.org","threadId":"7218","inReplyTo":"8b65902a0703121456s56008088ra14452ef7f325cf3@mail.gmail.com","subject":"Re: .git inside a .git: is it safe?","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-03-12T22:56:59Z","receivedAt":"2007-03-12T22:56:59Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Guilhem Bonnefille wrote:\n\n> Hi,\n> \n> I'm actually working on the packaging of a project. To do so, I use\n> two Git repositories:\n> - one to follow the main project\n> - one to manage my updates on this project.\n> \n> But, the matter is I cannot merge the both root. I need to have the\n> main project sources in a subdirectory of my own project. My workspace\n> is as follow: myproject/sub/tree/mainproject\n> \n> With SVN, I think such things are handled with svn:external.\n> \n> Actually, with Git, I frequently copy the mainproject inside its\n> subtree in my workspace.\n> \n> \n> But, I recently discover that everything seems fine if I include the\n> Git repo of mainproject inside the Git repo of my project. The layout\n> lloks like this:\n> myproject\n> |- .git\n> |- sub\n>   |- tree\n>     |- mainproject\n>       |- .git\n> \n> \n> It seems to work. But do you think such layout is \"safe\" ?\n\nIIRC Junio uses similar layout managing todo branch in git.git\n(which comes from separate repository).\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"37089","messageId":"8b65902a0703140802t4d98bbfdj84e8c4523e852e8a@mail.gmail.com","threadId":"7218","inReplyTo":"20070312221540.GA16545@spearce.org","subject":"Re: .git inside a .git: is it safe?","fromName":"Guilhem Bonnefille","fromEmail":"guilhem.bonnefille@gmail.com","sentAt":"2007-03-14T15:02:26Z","receivedAt":"2007-03-14T15:02:26Z","isPatch":false,"sender":{"key":"guilhem.bonnefille@gmail.com","avatar":"https://gravatar.com/avatar/375364bfee1f61197c540e37465abe3619fc24eb3a36b0edcea7f15b124036b0?d=mp&s=160"},"body":"Thanks for your answers. It's really a cool feature for my needs.\n\nOn 3/12/07, Shawn O. Pearce <spearce@spearce.org> wrote:\n> Yes, that's fine.  You just probably want an entry in the top level\n> project (myproject) that says ignore the stuff under mainproject.\n> That way \"git add .\" in myproject doesn't include files in\n> mainproject by accident.\n\nIn fact, in my case, I think I will prefer to store the mainproject's\nsources in both Git repo. By this way, I will be able to easily found\nthe version of mainproject's sources that are compatible with the rest\nof myproject.\n\n-- \nGuilhem BONNEFILLE\n-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com\n-=- mailto:guilhem.bonnefille@gmail.com\n-=- http://nathguil.free.fr/\n"}]}