{"thread":{"id":"23173","subject":"Checkout of orphan branch files into mainline worktree","startedAt":"2010-03-25T10:39:42Z","lastAt":"2010-03-25T11:10:20Z","messageCount":2,"participants":["Gianluca Pacchiella","Santi Béjar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"137793","messageId":"hofehl$jbn$1@dough.gmane.org","threadId":"23173","inReplyTo":null,"subject":"Checkout of orphan branch files into mainline worktree","fromName":"Gianluca Pacchiella","fromEmail":"gianluca.pacchiella@ktln2.org","sentAt":"2010-03-25T10:39:42Z","receivedAt":"2010-03-25T10:39:42Z","isPatch":false,"sender":{"key":"gianluca.pacchiella@ktln2.org","avatar":null},"body":"Hi folks,\n\nI have a repository where I maintain a project for a web site with a branch\n(disconnected from the mainline history) that contains some files\n(necessary only for a particular instance of a site) that don't intersect\nwith others files in the main project. Since I don't want to use submodule\nand subtree I manage myself to this sequence of commands (\"deploy\" is the\nbranch name of the mainline history and \"index\" of the --orphan branch) to\ncheckout the index's files into the mainline files\n\ngit read-tree index && ( git ls-files --with-tree=index | git\ncheckout-index --stdin ) && git read-tree deploy\n\nAre there some other ways to do this? I'm crazy? are there side effects?\n\nThanks,\n\tGianluca\n"},{"id":"137795","messageId":"adf1fd3d1003250410w5bd79777h77e1923e5a4b19dd@mail.gmail.com","threadId":"23173","inReplyTo":"hofehl$jbn$1@dough.gmane.org","subject":"Re: Checkout of orphan branch files into mainline worktree","fromName":"Santi Béjar","fromEmail":"santi@agolina.net","sentAt":"2010-03-25T11:10:20Z","receivedAt":"2010-03-25T11:10:20Z","isPatch":false,"sender":{"key":"santi@agolina.net","avatar":null},"body":"On Thu, Mar 25, 2010 at 11:39 AM, Gianluca Pacchiella\n<gianluca.pacchiella@ktln2.org> wrote:\n> Hi folks,\n>\n> I have a repository where I maintain a project for a web site with a branch\n> (disconnected from the mainline history) that contains some files\n> (necessary only for a particular instance of a site) that don't intersect\n> with others files in the main project. Since I don't want to use submodule\n> and subtree I manage myself to this sequence of commands (\"deploy\" is the\n> branch name of the mainline history and \"index\" of the --orphan branch) to\n> checkout the index's files into the mainline files\n>\n> git read-tree index && ( git ls-files --with-tree=index | git\n> checkout-index --stdin ) && git read-tree deploy\n>\n> Are there some other ways to do this? I'm crazy? are there side effects?\n\nI don´t know if this is a good idea in general, but you could get the\nsame result with:\n\ngit merge --no-commit index &&\ngit reset deploy\n\nHTH,\nSanti\n\n>\n> Thanks,\n>        Gianluca\n>\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"}]}