{"thread":{"id":"13358","subject":"Parent-less branches","startedAt":"2008-05-02T21:05:01Z","lastAt":"2008-05-03T14:05:40Z","messageCount":7,"participants":["Pedro Melo","Junio C Hamano","Wincent Colaiuta","Randal L. Schwartz","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"75877","messageId":"F26CE1A6-FE85-4AC6-BCE6-B41085A09F0F@simplicidade.org","threadId":"13358","inReplyTo":null,"subject":"Parent-less branches","fromName":"Pedro Melo","fromEmail":"melo@simplicidade.org","sentAt":"2008-05-02T21:05:01Z","receivedAt":"2008-05-02T21:05:01Z","isPatch":false,"sender":{"key":"melo@simplicidade.org","avatar":"https://gravatar.com/avatar/13ddbb01e300285a93aa1e3739653a81f9b1d3438bd03a4ac36b88e4ffeeafc3?d=mp&s=160"},"body":"Hi,\n\ninside an existing repository I want to create a new branch without a  \nparent commit. Is there a set of commands to do this? Usually only  \nthe initial commit of a\n\nThe idea is to use that branch to track an external source tarball.  \n From time to time, I would checkout the branch and dump a new  \ntarball with fresh source code, commit it to the branch and merge  \nagain with my master.\n\nI could create the setup this setup if I create a separate repo for  \neach external source tarball and then fetch them into my main  \nrepository. But I don't need those repos after that so I'm just  \nwondering if there is a way to create the empty branch directly.\n\nThanks,\n-- \nPedro Melo\nBlog: http://www.simplicidade.org/notes/\nXMPP ID: melo@simplicidade.org\nUse XMPP!\n"},{"id":"75879","messageId":"7vskx0wf8i.fsf@gitster.siamese.dyndns.org","threadId":"13358","inReplyTo":"F26CE1A6-FE85-4AC6-BCE6-B41085A09F0F@simplicidade.org","subject":"Re: Parent-less branches","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-05-02T21:47:09Z","receivedAt":"2008-05-02T21:47:09Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Pedro Melo <melo@simplicidade.org> writes:\n\n> inside an existing repository I want to create a new branch without a\n> parent commit. Is there a set of commands to do this?\n\nTypically these commits come about because you created a completely\nseparate history elsewhere in a separate repository and fetched and/or\npulled from there.\n\nSo \"a set of commands to do this\" would be:\n\n\tgo away\n\tgit init\n        build history as usual\n\tcome back\n        git fetch ..from that other repository..\n"},{"id":"75883","messageId":"0EACFC4A-F2E7-48D3-BE49-10D2B32AB470@wincent.com","threadId":"13358","inReplyTo":"7vskx0wf8i.fsf@gitster.siamese.dyndns.org","subject":"Re: Parent-less branches","fromName":"Wincent Colaiuta","fromEmail":"win@wincent.com","sentAt":"2008-05-02T22:32:25Z","receivedAt":"2008-05-02T22:32:25Z","isPatch":false,"sender":{"key":"greg@hurrell.net","avatar":"https://avatars.githubusercontent.com/u/7074?v=4"},"body":"El 2/5/2008, a las 23:47, Junio C Hamano escribió:\n> Pedro Melo <melo@simplicidade.org> writes:\n>\n>> inside an existing repository I want to create a new branch without a\n>> parent commit. Is there a set of commands to do this?\n>\n> Typically these commits come about because you created a completely\n> separate history elsewhere in a separate repository and fetched and/or\n> pulled from there.\n>\n> So \"a set of commands to do this\" would be:\n>\n> \tgo away\n> \tgit init\n>        build history as usual\n> \tcome back\n>        git fetch ..from that other repository..\n\nI wanted to do this just the other day, but I did it all inside the  \none repo, and made some notes on the process here:\n\nhttp://rails.wincent.com/wiki/Creating_independent_branches_with_Git\n\nBasically, using \"git write-tree\" and \"git commit-tree\" plumbing.\n\nCheers,\nWincent\n"},{"id":"75888","messageId":"A8B95683-9832-4973-B920-8546CC55F162@simplicidade.org","threadId":"13358","inReplyTo":"7vskx0wf8i.fsf@gitster.siamese.dyndns.org","subject":"Re: Parent-less branches","fromName":"Pedro Melo","fromEmail":"melo@simplicidade.org","sentAt":"2008-05-02T23:04:06Z","receivedAt":"2008-05-02T23:04:06Z","isPatch":false,"sender":{"key":"melo@simplicidade.org","avatar":"https://gravatar.com/avatar/13ddbb01e300285a93aa1e3739653a81f9b1d3438bd03a4ac36b88e4ffeeafc3?d=mp&s=160"},"body":"Hi,\n\nOn May 2, 2008, at 10:47 PM, Junio C Hamano wrote:\n\n> Pedro Melo <melo@simplicidade.org> writes:\n>\n>> inside an existing repository I want to create a new branch without a\n>> parent commit. Is there a set of commands to do this?\n>\n> Typically these commits come about because you created a completely\n> separate history elsewhere in a separate repository and fetched and/or\n> pulled from there.\n>\n> So \"a set of commands to do this\" would be:\n>\n> \tgo away\n> \tgit init\n>         build history as usual\n> \tcome back\n>         git fetch ..from that other repository..\n\nYes, that is what I was using until today.\n\nI was asking for a in-repo solution, without the second git init.\n\nThe following email by Wincent Colaiuta does exactly what I wanted :).\n\nThanks!\n-- \nPedro Melo\nBlog: http://www.simplicidade.org/notes/\nXMPP ID: melo@simplicidade.org\nUse XMPP!\n"},{"id":"75887","messageId":"B5BADF6F-7CFF-4A6C-BE06-0994786D8D0F@simplicidade.org","threadId":"13358","inReplyTo":"0EACFC4A-F2E7-48D3-BE49-10D2B32AB470@wincent.com","subject":"Re: Parent-less branches","fromName":"Pedro Melo","fromEmail":"melo@simplicidade.org","sentAt":"2008-05-02T23:04:46Z","receivedAt":"2008-05-02T23:04:46Z","isPatch":false,"sender":{"key":"melo@simplicidade.org","avatar":"https://gravatar.com/avatar/13ddbb01e300285a93aa1e3739653a81f9b1d3438bd03a4ac36b88e4ffeeafc3?d=mp&s=160"},"body":"Hi,\n\nOn May 2, 2008, at 11:32 PM, Wincent Colaiuta wrote:\n\n> El 2/5/2008, a las 23:47, Junio C Hamano escribió:\n>> Pedro Melo <melo@simplicidade.org> writes:\n>>\n>>> inside an existing repository I want to create a new branch  \n>>> without a\n>>> parent commit. Is there a set of commands to do this?\n[...]\n> I wanted to do this just the other day, but I did it all inside the  \n> one repo, and made some notes on the process here:\n>\n> http://rails.wincent.com/wiki/Creating_independent_branches_with_Git\n\nThis is exactly what I needed, thanks!\n\nBest regards,\n-- \nPedro Melo\nBlog: http://www.simplicidade.org/notes/\nXMPP ID: melo@simplicidade.org\nUse XMPP!\n"},{"id":"75891","messageId":"863ap0gu14.fsf@blue.stonehenge.com","threadId":"13358","inReplyTo":"A8B95683-9832-4973-B920-8546CC55F162@simplicidade.org","subject":"Re: Parent-less branches","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2008-05-02T23:34:15Z","receivedAt":"2008-05-02T23:34:15Z","isPatch":false,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Pedro\" == Pedro Melo <melo@simplicidade.org> writes:\n\nPedro> I was asking for a in-repo solution, without the second git init.\n\nWhy?  Are they charging you extra to type git init now? :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"},{"id":"75932","messageId":"alpine.DEB.1.00.0805031504390.30431@racer","threadId":"13358","inReplyTo":"7vskx0wf8i.fsf@gitster.siamese.dyndns.org","subject":"Re: Parent-less branches","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-05-03T14:05:40Z","receivedAt":"2008-05-03T14:05:40Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Fri, 2 May 2008, Junio C Hamano wrote:\n\n> Pedro Melo <melo@simplicidade.org> writes:\n> \n> > inside an existing repository I want to create a new branch without a \n> > parent commit. Is there a set of commands to do this?\n> \n> Typically these commits come about because you created a completely \n> separate history elsewhere in a separate repository and fetched and/or \n> pulled from there.\n\nIt is funny.  I really like that approach, but too many people seem to be \nmarried to the concept that you have to stay in the same working \ndirectory, and rather play dirty tricks with the plumbing.\n\nCiao,\nDscho\n"}]}