00:0.04 Let's jump back into PyCharm and actually work with some code and see what we
00:4.51 can do with Git and the Source code integration.
00:8.34 First thing to notice is all the files over here are white.
00:12.34 That means that they're checked into the repository.
00:14.81 They're not ignored. It would be this color they're not modified they would be blue
00:18.89 they're not new they would be green.
00:21.54 So let's go down here and just make some changes.
00:23.85 So for example let's say that this is going to be the talk python podcast downloader
00:29.53 And let's see down here this is displaying an individual result or getting an episode
00:37.05 and then displaying the results. So I'll go and change these.
00:40.2 Here's let's just say show episode details given an episode id
00:43.87  But we can come down here and we create a function and def show
00:48.61 episode details given an episode id which is an integer.
00:55.04 I'll just put that there and instead of doing that let's call show up.
00:59.06 So details and pass an episode id.
01:2.2 little bit of cleanup and or good to go.
01:6.14 So this is looking really nice.
01:8.7 Let's just make sure it runs sure enough.
01:13.41 Our show details works are little header at the top.
01:17.14 We can scroll way back through all these episodes.
01:19.93 There we go. We'll show that we've got our new title but if you look
01:24.61 carefully you'll notice some interesting things.
01:27.78 So first of all as we made changes notice program turned blue that means it was
01:32.33 in source control and now it's different.
01:35.0 It's been changed since then. But look in the gutter over by these line numbers
01:41.15 we got some colors over here.
01:43.44 We've got bluish, we've got greenish and brownish.
01:48.06 They're pretty subtle. So those are Source control items.
01:52.59 So let's click on this one.
01:53.38 So what we get. So check this out.
01:55.5 It shows you the changes right in line says,
01:57.78 Okay, the line online 12 says talk python podcast downloader.
02:2.64 But what it used to be is there used to be spaces,
02:5.02 see how it highlights that blue.
02:6.49 That's like a selection says there used to be spaces instead of talk python above and
02:10.28 podcast downloader. We can do all sorts of things.
02:12.85 We can sort of jump from this.
02:14.32 Change to this. Change to this.
02:15.59 Change such a small file. It doesn't matter.
02:17.74 But if you were on a huge file and you wanted to review all the changes
02:20.44 maybe that's useful. We could say,
02:22.45 you know what, I just want it back the way it was.
02:24.51 I could just click that and reverse.
02:25.9 Not the entire file, but just that the particular lines right now.
02:29.29 You see one. But in another situation you might see multiple lines.
02:33.74 Right? We just change it right here.
02:36.54 We can copy the old version but we copy that and paste it down here.
02:40.78 There's the old version and we can pull down the changes and create what's called a
02:47.21 changeless, which allows us to stack up the changes and commit them as a group
02:50.51 Okay, so we have our changes here.
02:53.72 This section. We've added new lines,
02:56.07 we've added this bit here and it used to be that.
03:0.04 And then down here these sections have just moved around.
03:3.31 Okay, so again, really,
03:5.1 really cool stuff. We can also like this to show a larger def a full
03:9.35 screen def like this. Maybe that's not so interesting.
03:12.46 How about this one? There you go.
03:15.1 You can see we started out with the code just inside the loop and then we
03:18.34 create a function and we're calling the function gives you a real good idea of what's
03:21.72 going on in that section. So the actual editor integration for source control is fantastic
03:27.55 Another thing we can do is we can click on this and because we're in
03:32.27 git we have all these git operations on this particular file.
03:35.49 So we can just hit show diff and it'll show you the entire def not just
03:39.44 for a particular line but for this file compared against what's in the repository versus what
03:44.23 we've written been written. So there you can see all the changes all together.
03:49.04 Super, super cool. You can go over here and see in the editor exactly
03:53.51 what has changed notice over here on the right as well.
03:56.74 You can see these sections right there and it shows you it would be much more
04:0.41 useful in a large file but you can see as if this was a really large
04:3.29 file, you can see all the way down here like in this section there have
04:6.7 been some changes to the file that need to be checked out.
04:9.76 You don't get the coloration to indicate what kind of changes just there were source changes
04:14.13 since the last check in really,
04:16.09 really powerful integration into the editor,
04:18.15 so be sure to pay attention to it.
