Effective PyCharm 2025 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 What's your Git philosophy? Are you every little change gets checked into Git? Or do you like to do tons of work?
0:10 And when it's finally ready, a carefully crafted commit, representing days worth of work, gets pushed into Git and stored there.
0:20 Well, me, I'm the let commit as if we're hitting the save button, basically. But I know other people like to wait longer.
0:29 Regardless of how you work, there might be times when you've made changes that you didn't save to source control.
0:36 Maybe you're unsure if you want to save it or not. You've been fooling around with it and then something happens.
0:41 You delete that section or you've moved past what you worked on. I wish I could get back to the way it was.
0:49 You're in luck because PyCharm has an awesome feature called local history. Consider it like a hidden second layer of source control.
0:58 So here's the deal. Periodically, all the files that you work on get saved, kind of like they're going into source control.
1:06 And you can go in and you can open up what's called local history. And then you can see all of the changes. The first one says modify engine.py.
1:16 Another one's create Python script utils, creating this particular file.
1:20 And you can actually go back in time and it will show you how all the files in your project have changed over time.
1:27 And look at how frequently this is happening. We have it at 738 a.m., 738 a.m., 738 a.m., 739 a.m., 740 a.m., 741, 743. Frequently changes.
1:41 Even my obsessive checking in to get doesn't go that quickly. It doesn't go that quickly. So this is really awesome.
1:49 It's like a super fine-grained history of all of your changes.
1:53 So if you ever thought, oh, no, I didn't check that into source control, but I need to roll it back. Check out your local history. It's super cool.
2:02 It'll definitely save you.


Talk Python's Mastodon Michael Kennedy's Mastodon