00:0.04 The next thing I want to focus on is branching.
00:3.04 Now, if branching is a concept that's new to you,
00:6.09 it allows for parallel development within source code. 
00:11.05 ideas you can create one branch, one area where people are working and putting their code
00:15.66 emerging and then another where people can continue to work with different,
00:19.76 possibly incomplete or breaking changes and then often ideas at some point they're going to be
00:24.64 brought back together once both sets of changes are made.
00:28.14 A really common way that this might be done is we might have a feature request
00:32.54 and instead of trying to add the feature directly to the main branch,
00:35.9 which will put likely the software into some incomplete state where we couldn't ship it to
00:41.03 production, we'll work in a second branch and then we're already we're gonna bring those
00:46.25 back over often in what's called a poor request.
00:49.84 So I wanna take you through that flow as a way of teaching about how 
00:54.01 PyCharm work with branches. So you learn a little bit about this,
00:56.43 git flow stuff as well. So what we're gonna do is we're gonna go over
00:58.79 here, I'm going to create an issue for a moment and this is going to
01:2.21 be ad version to header, title display.
01:6.33 This is not important enough really to justify this whatsoever,
01:10.84 but here's an idea. We want the app version in the header.
01:16.54 Okay, we had that little talk python podcast downloaded thing.
01:19.8 Well we wanted to say version 2.1 or something so I'll go ahead and assign this
01:23.93 to myself. It doesn't really matter.
01:25.29 But let's go ahead and create it.
01:27.54 Why did I create this issue?
01:28.84 Because this is super common around adding features of software.
01:33.08 We're going to have an issue then we have a branch where we develop those changes
01:36.46 to that issue and then we're gonna put that branch back in the main so we'll
01:39.58 go quite through that flow. So I'm gonna go create a branch like this,
01:44.35 we'll just say version to header and the number is 48 that's the issue number.
01:48.54 So let's go back to the code here and I'm going to go say we want
01:54.94 Version to header with some dashes here.
01:59.34 I'm going to put the issue name for my version branch.
02:1.31 I'll put the issue names will create this branch and let's go back over into PyCharm
02:6.49 So here we are. And we want to make a change,
02:10.06 we want to say like version 2.1 or whatever.
02:13.74 We don't have those changes. We just made on the server.
02:16.71 And if you go down here on the right this section right here,
02:19.56 this little branch, this is where all the branch magic in PyCharm lives and
02:23.22 it's really, really useful so we can see the remote branches.
02:26.49 The local branches. If there's a new remote one,
02:28.72 I could check it out but I already have it checked out here.
02:31.35 So there's not a lot going on but I want to go and get the new
02:35.15 ones. So just like getting new code,
02:36.9 we can click this update project.
02:39.34 And then now down here we have our feature branch version to header,
02:43.64 issue 48. But notice it's not in our local branches so I'm going to go
02:48.08 and check this out now. It looks the same because we created a branch off
02:53.31 of what we were working on before.
02:55.24 But down here notice we're now on this particular branch but we can go and add
03:0.75 our feature. What version is this going to be?
03:3.31 Well let's say it's 2.1 and let's even go farther.
03:6.24 We'll actually put a little version maybe even version you got one down into the section
03:17.92 We can actually print it out like this.
03:21.74 Make that an F. String.
03:22.75 Perfect. Let's test our code all there it is.
03:25.68 I see there's some amazing stuff up here.
03:28.14 We've got our version but notice we could probably use a few more dashes so let's
03:33.64 put that in there, see that we're happy the feature.
03:36.08 Oh it looks pretty good. Now we go I think that's pretty close clean up
03:41.26 the code so we're really happy with it and now we're going to commit this back
03:46.24 into github so we're gonna committed to this version branch.
03:51.04 I'm gonna go over here and I'm gonna actually say this issue fixes the issue.
03:54.7 What issue is it? Well I was very careful to choose my branch to have
03:59.0 the issue name so that always saves me from going and checking what I'm working on
04:3.38 So this fixes number 48.
04:5.72 Ad version to title. We can go ahead and commit and push that straight to
04:10.53 github. It's going to push to the branch that we care about.
04:14.24 Wait for it committed. Go back to our project.
04:17.96 You can see the color of our program is back now just because we made the
04:23.16 changes to this branch that didn't change the main thing.
04:25.89 So let's go over here and switch back to our ref.
04:29.89 And I notice it's back without the version.
04:32.84 You also get this workspace dialog.
04:35.1 So this workspace basically the shape of these windows which Windows was open and all that
04:40.23 kind of stuff. They are associated with that branch.
04:42.82 And if you go to another branch and reconfigure out everything what looks and you switch
04:46.92 between the branches. You can have PyCharm basically adapt to the different workflows and
04:53.05 if you come down here and even configure it to say show me the notification each
04:56.54 time. I don't want to see the notification.
04:58.13 I'm fine that it does the switch but I don't need to be told about it
05:1.4 every single time. So there it should be quiet when we switch between our branches
