{"thread":{"id":"30056","subject":"Sharing nested subparts of large repository?","startedAt":"2012-03-25T16:38:22Z","lastAt":"2012-04-05T08:32:34Z","messageCount":7,"participants":["LordSmoke","Phil Hord","Dennis E. Slice","Neal Kreitzinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"187681","messageId":"1332693502389-7403743.post@n2.nabble.com","threadId":"30056","inReplyTo":null,"subject":"Sharing nested subparts of large repository?","fromName":"LordSmoke","fromEmail":"dslice@morphometrics.org","sentAt":"2012-03-25T16:38:22Z","receivedAt":"2012-03-25T16:38:22Z","isPatch":false,"sender":{"key":"dslice@morphometrics.org","avatar":null},"body":"I've been using git for a couple of months to get used to the system. Basic\nstuff - a few larger project repositories in unique directories, commits,\npushes to a remote repository. Mostly as a kind of backup system.\n\nHowever, my ultimate goal is to share part of one large project currently\nbeing managed with git with my developers. I want them to have access to\nsource code and test data, but not my manuscripts, correspondence, whatever.\n\nI also want to make a portion of what I will give my developers available as\nopen source, e.g., on github, but not all of it. Just the stable,\nnon-developmental parts. NOT the our development stuff and not the parts\nbeing used for private contracts.\n\nSubmodules seem promising, but the examples are not quite what I am looking\nfor, as far as I can tell. They talk about isolating submodules that depend\non a larger project. I want to make available the larger project while\nkeeping nested submodules (so to speak) private.\n\nWould someone point me in the right direction to achieve my goals?\n\nTIA\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Sharing-nested-subparts-of-large-repository-tp7403743p7403743.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"187704","messageId":"CABURp0r-uY_HH1jw6P9KUvg-XNhYShVLnfcTMH78atdTV9K89w@mail.gmail.com","threadId":"30056","inReplyTo":"1332693502389-7403743.post@n2.nabble.com","subject":"Re: Sharing nested subparts of large repository?","fromName":"Phil Hord","fromEmail":"phil.hord@gmail.com","sentAt":"2012-03-26T04:07:23Z","receivedAt":"2012-03-26T04:07:23Z","isPatch":false,"sender":{"key":"phil.hord@gmail.com","avatar":"https://avatars.githubusercontent.com/u/123908?v=4"},"body":"On Sun, Mar 25, 2012 at 12:38 PM, LordSmoke <dslice@morphometrics.org> wrote:\n> I've been using git for a couple of months to get used to the system. Basic\n> stuff - a few larger project repositories in unique directories, commits,\n> pushes to a remote repository. Mostly as a kind of backup system.\n>\n> However, my ultimate goal is to share part of one large project currently\n> being managed with git with my developers. I want them to have access to\n> source code and test data, but not my manuscripts, correspondence, whatever.\n>\n> I also want to make a portion of what I will give my developers available as\n> open source, e.g., on github, but not all of it. Just the stable,\n> non-developmental parts. NOT the our development stuff and not the parts\n> being used for private contracts.\n>\n> Submodules seem promising, but the examples are not quite what I am looking\n> for, as far as I can tell. They talk about isolating submodules that depend\n> on a larger project. I want to make available the larger project while\n> keeping nested submodules (so to speak) private.\n>\n> Would someone point me in the right direction to achieve my goals?\n\nThere's a blog post detailing a similar workflow here:\nhttp://www.braintreepayments.com/devblog/our-git-workflow\n\nGrr... I think they used to have a section on keeping some parts of\nthe project \"forever private\", but I don't see that now.\n\nPhil\n"},{"id":"187784","messageId":"4F70D4E2.2010206@morphometrics.org","threadId":"30056","inReplyTo":"CABURp0r-uY_HH1jw6P9KUvg-XNhYShVLnfcTMH78atdTV9K89w@mail.gmail.com","subject":"Re: Sharing nested subparts of large repository?","fromName":"Dennis E. Slice","fromEmail":"dslice@morphometrics.org","sentAt":"2012-03-26T20:43:14Z","receivedAt":"2012-03-26T20:43:14Z","isPatch":false,"sender":{"key":"dslice@morphometrics.org","avatar":null},"body":"\n\nOn 3/26/12 12:07 AM, Phil Hord wrote:\n> On Sun, Mar 25, 2012 at 12:38 PM, LordSmoke<dslice@morphometrics.org>  wrote:\n<...snip...>\n>>\n>> Would someone point me in the right direction to achieve my goals?\n>\n> There's a blog post detailing a similar workflow here:\n> http://www.braintreepayments.com/devblog/our-git-workflow\n\nYes. That is exactly where I was heading in thinking about things and \nlearning more about branches. gitx or gitg really help clarify the \nrelationships and allow one to think better about the organization. I \nhad looked at all this early on, but was too new to be anything other \nthan confused. I have enough experience now to appreciate at least some \nof it.\n\nTIA\n\n>\n> Grr... I think they used to have a section on keeping some parts of\n> the project \"forever private\", but I don't see that now.\n>\n> Phil\n>\n>\n"},{"id":"187923","messageId":"4F72DF55.6000202@gmail.com","threadId":"30056","inReplyTo":"1332693502389-7403743.post@n2.nabble.com","subject":"Re: Sharing nested subparts of large repository?","fromName":"Neal Kreitzinger","fromEmail":"nkreitzinger@gmail.com","sentAt":"2012-03-28T09:52:21Z","receivedAt":"2012-03-28T09:52:21Z","isPatch":false,"sender":{"key":"nkreitzinger@gmail.com","avatar":null},"body":"On 3/25/2012 11:38 AM, LordSmoke wrote:\n> I've been using git for a couple of months to get used to the system.\n> Basic stuff - a few larger project repositories in unique\n> directories, commits, pushes to a remote repository. Mostly as a kind\n> of backup system.\n>\n> However, my ultimate goal is to share part of one large project\n> currently being managed with git with my developers. I want them to\n> have access to source code and test data, but not my manuscripts,\n> correspondence, whatever.\n>\n> I also want to make a portion of what I will give my developers\n> available as open source, e.g., on github, but not all of it. Just\n> the stable, non-developmental parts. NOT the our development stuff\n> and not the parts being used for private contracts.\n>\n> Submodules seem promising, but the examples are not quite what I am\n> looking for, as far as I can tell. They talk about isolating\n> submodules that depend on a larger project. I want to make available\n> the larger project while keeping nested submodules (so to speak)\n> private.\n>\nIt sounds like maybe your superproject has all the submodules and their\nsuperproject has only some of the submodules.  You can also have a \nsuperproject just like theirs so you have a superproject with everything \n(because your special) and another superproject like theirs (so you can \npretend to be just like them).\n\nI'm not a submodule expert, but I'm pretty sure you can do that. \nWhether or not that matches up with your current structure of various \ngit repos or not I don't know (enough details).\n\nv/r,\nneal\n"},{"id":"187959","messageId":"1332957138457-7414676.post@n2.nabble.com","threadId":"30056","inReplyTo":"1332693502389-7403743.post@n2.nabble.com","subject":"Re: Sharing nested subparts of large repository?","fromName":"LordSmoke","fromEmail":"dslice@morphometrics.org","sentAt":"2012-03-28T17:52:18Z","receivedAt":"2012-03-28T17:52:18Z","isPatch":false,"sender":{"key":"dslice@morphometrics.org","avatar":null},"body":"Thanks for the helpful replies. It does seem that branches will do what I\nwant. Yesterday, I organized my files and created an (eventually)\nopen-source startup project (distinct from the development application\nstartup).\n\nI created a branch \"development\" and \"git rm\"'d the (many) files I didn't\nwant to pass along to my developers. The trick here, I think, is you have to\ndo an initial commit before the rm's or else it will affect the master...or\nsomething. Anyway, I had to reset and try a couple of times, but in the end\nit worked. \n\nAfter checking out that branch, I created \"public\", initial commit, then\nrm'd the development startup project and the other files I wouldn't want to\npost to the world.\n\nI also managed to push these branches to my remote repository. Add them to\nmy office repository as tracked branches, and test cloning, It works just as\nI had envisioned - cloning the public branch produces the minimal structure.\n\nI think I am two steps away from complete satisfaction. Not related to this,\nI have some files that are reluctant to be updated, added, tracked, or\nuntracked, but that's a different issue. \n\nNow, though, I am wondering about merging the changes across branches. Say I\nmake changes on the development branch. If I merge that into the master,\nwill the reduced tracking be merged? - don't want that. If I merge the other\nway - from, say, checkout public and merge in development? Will a bunch of\nother stuff come over?\n\nAnyway, that is where I am now and what I am looking into. Very happy with\nprogress, so far.\n\nOh, while I do everything from the command line, seeing it graphically with\ngitx has really helped me conceptualize what is going on. All of this has\ngiven me a much better understanding of what is going on in the little time\nI have been able to spend on it. \n\n--\nView this message in context: http://git.661346.n2.nabble.com/Sharing-nested-subparts-of-large-repository-tp7403743p7414676.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"188092","messageId":"1333051549578-7419114.post@n2.nabble.com","threadId":"30056","inReplyTo":"1332957138457-7414676.post@n2.nabble.com","subject":"Re: Sharing nested subparts of large repository?","fromName":"LordSmoke","fromEmail":"dslice@morphometrics.org","sentAt":"2012-03-29T20:05:49Z","receivedAt":"2012-03-29T20:05:49Z","isPatch":false,"sender":{"key":"dslice@morphometrics.org","avatar":null},"body":"Drat! I got my branches set up the way I wanted, but basic merge\nrestores/deletes files depending upon what I am merging with what. E.g.,\n\"master\" <-merge- \"development\" deletes master's files I want to keep,\n\"development\" <-merge- \"master\" adds back in the files I took out of\n\"development\". Perhaps some merge options.\n\nStill looking... 8-/\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Sharing-nested-subparts-of-large-repository-tp7403743p7419114.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"188553","messageId":"1333614754844-7439149.post@n2.nabble.com","threadId":"30056","inReplyTo":"1332957138457-7414676.post@n2.nabble.com","subject":"Re: Sharing nested subparts of large repository?","fromName":"LordSmoke","fromEmail":"dslice@morphometrics.org","sentAt":"2012-04-05T08:32:34Z","receivedAt":"2012-04-05T08:32:34Z","isPatch":false,"sender":{"key":"dslice@morphometrics.org","avatar":null},"body":"Okay, it seems submodules really were the answer. I split my app into a\nstandalone public subtree and a development subtree that will use the public\nsource as a submodule (haven't actually done that yet, though). These will\nbe excluded from the parent git repository, but I guess that is fine since\nthe parent is used mainly for archiving and the remote repository serves as\nthe code archive.\n\n--\nView this message in context: http://git.661346.n2.nabble.com/Sharing-nested-subparts-of-large-repository-tp7403743p7439149.html\nSent from the git mailing list archive at Nabble.com.\n"}]}