Up and Running with Git Transcripts
Chapter: Teamwork: Branches
Lecture: Reason #2 for branching: More stable development
0:00 The second reason you might want to branch is to create more stability for development and
0:07 releases if you have some kind of QA department or you might need to be releasing
0:13 frequently, maybe this is a web app and every couple of days you want to
0:18 roll out some kind of feature but there might be multiple people working on it or
0:22 you just might be working on something that's going to create some instability and you want
0:25 to always have the main shipping version of your application in a stable state that you can always release if you need to.
0:34 So we might again have a scenario that looks like this, but we might create some kind of dev branch alongside our main branch.
0:42 When I usually do this actually call the main branch where we're just doing the development
0:46 work and I have a production branch that we might use for shipping stuff over to production. And as we do work along the dev branch,
0:54 we periodically are going to merge those changes back over to keep the main branch in sync with this dead branch. Now,
1:02 this is a simplistic view of how you would do this here, this is probably not how it's gonna look for large teams as well.
1:10 See we're getting into more interesting and nuanced aspects as we talk about more of the reasons for branching, but here's a simple one.
1:18 We just create a branch where we do our work and then we create a branch where if you checked out it should build,
1:23 it should run, it should work and we just periodically bring those changes back over
1:28 through merging. So reason number two for branching to create a more stable release branch
1:33 and a place where we can do development without fear that every little tiny change has to continue to work all the time.