Effective PyCharm Transcripts
Chapter: Source control
Lecture: Local history
Login or purchase this course to watch this video and the rest of the course contents.
0:00 We've seen that the source control features and the Git and Github integration with PyCharm
0:05 are fantastic. But there are times when it's not enough opinion on how you work
0:11 Maybe you check in your code very frequently or maybe one of these people that works and gets things just right and then checks it in.
0:18 You work on something for three or four hours and then great is ready. Let's do a check in. If you're that type of person,
0:24 there's a good chance that you would want some kind of comparison some kind of rollback feature during that three hour period.
0:32 Another scenario might be you just create a project that has no source control set up PR
0:36 yet at all. But you would like some kind of source control features. Like I made some changes. Whoops,
0:42 I need to go back to the way it was half an hour ago and don't really remember how that was. So you're in luck PyCharm has this thing called
0:49 local history, which is a little bit like what git and source control does for you, but it has nothing to do with.
0:55 And you check it in. It's just when you save the file and as you make changes to it, there's this huge long running list of it.
1:01 So check this out if we right click we have our GIT, which is what we've been talking about the whole time. But if we go up one,
1:07 we have local history, you can even label points in time just locally for yourself But let's just check out the history.
1:15 So look at what we got going on here. I'll make this nice and big that we've got some changes that we made right there
1:22 Right. This is some format change we made. There's some other small change where we remember we had to make these longer because they
1:32 weren't long enough because here's the green bit where we added that on as part of
1:35 those changes. And down here's a ton where we actually put the version on the end and you see the version up at the top,
1:43 the variable the version and so on. So there's all these amazing little changes and check this out.
1:48 We also have external changes that come from updating things from source control over here, we've got, we did a commit,
1:56 you can see when we committed back to git hub. So you can actually check this part out here and say, okay, this lines up with that,
2:03 checking on git hub and then there's a whole bunch of other changes that were not tracked by Github or anything else,
2:08 but we have this really, really cool local history and here's even tracking it coming
2:13 back from git how the changes we did as part of our feature branch, were merged back into our working branch,
2:21 not the feature branch. So I strongly encourage you to use this and again, like I said, it's available to you, even if you don't have source control,
2:30 even if your project has nothing to do with git or subversion or any of those
2:34 things, you still have this available and you can do things like add a label to it. You can revert the changes back to here.
2:41 It has a very strong source control field, really great to have this as a backup and a more fine grain history of what you have been doing.