{"thread":{"id":"32558","subject":"Understanding When to Use Branches","startedAt":"2013-01-08T13:46:21Z","lastAt":"2013-01-08T17:08:00Z","messageCount":2,"participants":["gw1500","Konstantin Khomoutov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"206292","messageId":"50EC232D.90009@yahoo.com","threadId":"32558","inReplyTo":null,"subject":"Understanding When to Use Branches","fromName":"gw1500","fromEmail":"wtriker.ffe@gmail.com","sentAt":"2013-01-08T13:46:21Z","receivedAt":"2013-01-08T13:46:21Z","isPatch":false,"sender":{"key":"wtriker.ffe@gmail.com","avatar":null},"body":"As a git noobie I am beginning get get my head around git's version\ncontrol philosophy. I am now trying to understand the purposes of\nbranches or rather when to use them. In my case I have a Java\napplication under version control with git. I am planning to port it\ninto a mobile app. Is that an appropriate use of branches or should it\nbe created as a new repository? What is the relationship between the\nsame source code in different branches? Do changes to code in one branch\nget ported to another branch somehow or do all changes then have to be\nmade twice? The documentation tells how to branch but not the general\nphilosophy behind it from a best practices standpoint. Thanks in advance\nfor any insight.\n"},{"id":"206305","messageId":"20130108210800.c10104667727c8c9c4d2324d@domain007.com","threadId":"32558","inReplyTo":"50EC232D.90009@yahoo.com","subject":"Re: Understanding When to Use Branches","fromName":"Konstantin Khomoutov","fromEmail":"kostix+git@007spb.ru","sentAt":"2013-01-08T17:08:00Z","receivedAt":"2013-01-08T17:08:00Z","isPatch":false,"sender":{"key":"kostix+git@007spb.ru","avatar":null},"body":"On Tue, 08 Jan 2013 08:46:21 -0500\ngw1500 <wtriker.ffe@gmail.com> wrote:\n\n> As a git noobie I am beginning get get my head around git's version\n> control philosophy. I am now trying to understand the purposes of\n> branches or rather when to use them. In my case I have a Java\n> application under version control with git. I am planning to port it\n> into a mobile app. Is that an appropriate use of branches or should it\n> be created as a new repository? What is the relationship between the\n> same source code in different branches? Do changes to code in one\n> branch get ported to another branch somehow or do all changes then\n> have to be made twice? The documentation tells how to branch but not\n> the general philosophy behind it from a best practices standpoint.\n> Thanks in advance for any insight.\n\nSupposedly you should start with the chapter on branching in\nThe Book [1] and then read two classic blog posts [2, 3] describing two\ndifferent branching models.  The branching models described there are\nnot the only two possible models to use with Git, but they are different\nenough to give you a good overview of possibilities.\nNote that mere googling for \"git branching model\" would yield a fair\nnumber of blog posts on people's pet branching models; these two\ndocuments just appear to be more \"classic\" than others.\n\nIf you have difficulty to even grasping the concept of branches and [1]\nfeeld hard to digest, try first reading \"The Git Parable\" [4] which, I\nthink, is the friendliest possible introduction to the basics of DVCS,\nbranching included.\n\n1. http://git-scm.com/book/en/Git-Branching\n2. http://nvie.com/posts/a-successful-git-branching-model/\n3. http://scottchacon.com/2011/08/31/github-flow.html\n4. http://tom.preston-werner.com/2009/05/19/the-git-parable.html\n"}]}