Up and Running with Git Transcripts
Chapter: Teamwork: Branches
Lecture: Reason #3 for branching: Experimentation

Login or purchase this course to watch this video and the rest of the course contents.
0:00 Reason three for branching is experimentation.
0:04 I opened this course by talking about source control being a superpower that lets you fearlessly
0:10 change and experiment with your application.
0:13 Here's part of what I meant.
0:15 So, again, we have our main branch and here we don't have version numbers
0:18 let's imagine. This is like a web application where you just sort of continuously
0:23 release it as features are done and we want to try some new ideas.
0:27 So maybe we want to think about rewriting the front end,
0:31 maybe it's an angular and like I'd really like to try to see how Vue Js
0:35 is going to work out. What if we rewrote that?
0:37 It seems like that has more,
0:38 more momentum and you know, in javascript,
0:41 you gotta rewrite everything every six months at a minimum,
0:44 right? There's a rule for that here,
0:46 what we might do is we might say we're going to fork off a branch,
0:51 whatever the current stable version is,
0:54 and we're going to completely rewrite the front end in Vue js and then we're going
0:59 to decide, did that go well,
1:01 do we really want to do this or do we not want to?
1:03 So we might make some changes,
1:05 you know, because it's a branch other people could contribute and look at it and
1:10 we might decide, you know what?
1:12 It's not necessarily that much better.
1:14 So let's just stick with what it is now.
1:16 So in this case we're not going to merge those changes back,
1:19 We're just going to kind of abandon it for now and if we want to pick
1:22 it up later. Sure, we can do that.
1:24 Maybe another idea. We want to talk about using an asynchronous ORM.
1:29 Maybe we want to talk about using SQLalchemy 2,
1:32 and async and await and see if we can get a lot better scalability
1:35 and support more users on the same hardware and the same code base.
1:39 So we might experiment with that will create another branch,
1:43 then we're going to change everything over in the data layer and guess what?
1:47 This worked out, awesome. We're super psyched about it.
1:50 We're like, yeah, this is definitely the path forward.
1:52 So in this case we merged those changes back into the main branch for experimentation.
1:57 Sometimes experiments work out sometimes they don't,
2:01 but it allows us it's great flexibility.
2:03 Nothing that we did with the view,
2:05 experimentation broke the app or derail development or anything like that.
2:10 And we were able to just leave it in the branch.
2:12 The async stuff worked out and we're able to bring that in to go forward and now everyone has that async feature to work with. The reason no3 is experimentation.