Up and Running with Git Transcripts
Chapter: Teamwork: Branches
Lecture: Branching == credit card debit?

Login or purchase this course to watch this video and the rest of the course contents.
0:00 A good analogy for branching is a little bit like credit cards,
0:03 if all you have is cash,
0:05 it's hard to buy things, it's hard to be really flexible financially,
0:10 you've got to go to the bank and get more cash if you wanted to buy
0:12 something. Even if you have tons of money in the bank,
0:14 if you don't have the cash on hand,
0:16 you won't be able to buy the thing and forget internet shopping,
0:19 that's no good. Right? So credit cards are awesome,
0:22 just like that branches are awesome too.
0:24 They allow you this flexibility to do all these things.
0:26 I can break off and in parallel I can do all of this amazing work.
0:31 However, the longer that you stay separated from the main branch,
0:36 the more out of sync you are in space and time with the current development work
0:40 the harder it is going to be to bring those changes back together,
0:45 just like not never paying off your credit card and letting the balance grow and grow
0:49 it is not a good thing.
0:51 So you definitely want to make sure that you keep your branches in sync as much
0:56 as possible. So that means it's a feature branch don't stay apart for too long
1:01 There's also some other cool techniques that we can look at that will show you
1:05 how to pay down that debt as you go.
1:08 But you should think of branching a little bit like credit cards and if you don't
1:13 pay them off, you don't do the merge on the branch and you don't go
1:18 and pay off your credit card.
1:19 Similarly bad things are going to accumulate,
1:22 and it'll be harder when the time comes to finally do that.