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:07
source control and version so we can see first of all that we have colors on
0:11
the screen over in the project as well as up here in the tabs we have
0:16
three different colors. We have blue.
0:19
That means something was in source control already but it's been changed.
0:23
We have the 4th color, the white one,
0:25
which just means it's instant source control but no changes.
0:29
settings.json is red because it's new and has not yet been even added to git
0:36
the utils is green because it's been added but not committed yet.
0:41
So it's new and not committed.
0:43
Engine is blue because it's existing but not committed and then the settings is basically no
0:49
version control is happening on it yet.
0:51
We also over here in the gutter have a couple of colours we saw that.
0:56
Blue means it's changed. Green means it's new.
1:00
There's all sorts of stuff we can quickly take in about the state of the project
1:03
how it is managed in source control and how it's changed since we last got
1:08
a version by just looking at the colors right here.
1:11
If we focus in on the editor itself and look at the gutter where we have
1:16
the colours. If we click right here on that colored bar,
1:19
we get a little in line dif a thing that allows us to both see what's
1:24
changed and manage it. Like roll it back or change which change list it's associated
1:29
with. So we had a run on sentence,
1:31
the specified template folder must be a folder comma it's not.
1:35
We decided that's better as two sentences.
1:37
So we changed it and you can see those characters that changed are highlighted.
1:42
Now we have period capital. I it's not so really need that.
1:47
We can go and see exactly what's changed.
1:51
If we click these arrows in this navigation section,
1:54
it will take us from one change to the next and the next.
1:58
This is really only helpful in large files where you don't see them all at once
2:01
We click this turnaround arrow.
2:03
That means roll back the changes.
2:05
Remember we have this in the toolbar as well,
2:07
but the toolbar rolls back the entire file or actually pulls up a dialog that allows
2:12
us to roll back multiple files if we want this,
2:14
just rolls back the one change here.
2:17
We can open it in a diff window.
2:19
Doesn't make sense here. It's extremely simple.
2:21
But if you wanted to explore a larger,
2:23
more complicated change, you could do that.
2:25
You can copy the original. So the one sentence that's in the red box,
2:29
not the final code. Lot of cool things we can do right inside the editor here.