Effective PyCharm Transcripts
Chapter: Source control
Lecture: Concept: Editor level source control
Login or purchase this course to watch this video and the rest of the course contents.
0:00 Here's a quick review of how the code editor facilitates and helps us visualize changes around
0:08 source control and version so we can see first of all that we have colors on the screen over in the project as well as up here in the tabs we have
0:17 three different colors. We have blue. That means something was in source control already but it's been changed. We have the 4th color, the white one,
0:26 which just means it's instant source control but no changes. settings.json is red because it's new and has not yet been even added to git
0:37 the utils is green because it's been added but not committed yet. So it's new and not committed.
0:44 Engine is blue because it's existing but not committed and then the settings is basically no version control is happening on it yet.
0:52 We also over here in the gutter have a couple of colours we saw that. Blue means it's changed. Green means it's new.
1:01 There's all sorts of stuff we can quickly take in about the state of the project
1:04 how it is managed in source control and how it's changed since we last got a version by just looking at the colors right here.
1:12 If we focus in on the editor itself and look at the gutter where we have the colours. If we click right here on that colored bar,
1:20 we get a little in line dif a thing that allows us to both see what's
1:25 changed and manage it. Like roll it back or change which change list it's associated with. So we had a run on sentence,
1:32 the specified template folder must be a folder comma it's not. We decided that's better as two sentences.
1:38 So we changed it and you can see those characters that changed are highlighted. Now we have period capital. I it's not so really need that.
1:48 We can go and see exactly what's changed. If we click these arrows in this navigation section,
1:55 it will take us from one change to the next and the next. This is really only helpful in large files where you don't see them all at once
2:02 We click this turnaround arrow. That means roll back the changes. Remember we have this in the toolbar as well,
2:08 but the toolbar rolls back the entire file or actually pulls up a dialog that allows us to roll back multiple files if we want this,
2:15 just rolls back the one change here. We can open it in a diff window. Doesn't make sense here. It's extremely simple.
2:22 But if you wanted to explore a larger, more complicated change, you could do that.
2:26 You can copy the original. So the one sentence that's in the red box, not the final code. Lot of cool things we can do right inside the editor here.