Up and Running with Git Transcripts
Chapter: Teamwork: Branches
Lecture: Reason #2 for branching: More stable development

Login or purchase this course to watch this video and the rest of the course contents.
0:00 The second reason you might want to branch is to create more stability for development and
0:06 releases if you have some kind of QA department or you might need to be releasing
0:12 frequently, maybe this is a web app and every couple of days you want to
0:17 roll out some kind of feature but there might be multiple people working on it or
0:21 you just might be working on something that's going to create some instability and you want
0:24 to always have the main shipping version of your application in a stable state that you
0:30 can always release if you need to.
0:33 So we might again have a scenario that looks like this,
0:36 but we might create some kind of dev branch alongside our main branch.
0:41 When I usually do this actually call the main branch where we're just doing the development
0:45 work and I have a production branch that we might use for shipping stuff over to
0:49 production. And as we do work along the dev branch,
0:53 we periodically are going to merge those changes back over to keep the main branch in
0:59 sync with this dead branch. Now,
1:01 this is a simplistic view of how you would do this here,
1:05 this is probably not how it's gonna look for large teams as well.
1:09 See we're getting into more interesting and nuanced aspects as we talk about more of the
1:14 reasons for branching, but here's a simple one.
1:17 We just create a branch where we do our work and then we create a branch
1:19 where if you checked out it should build,
1:22 it should run, it should work and we just periodically bring those changes back over
1:27 through merging. So reason number two for branching to create a more stable release branch
1:32 and a place where we can do development without fear that every little tiny change has
1:37 to continue to work all the time.