Now let's look at the git tools built into VS code.
So here on the left side, we have the source control panel
where we can see all the changes in our project. So what we see
here is similar to the output of the status command, we can see
all the change files, and the kind of changes introduced in
those files. So here we have changes in file, one dot j s, we
can click on a file to get a diff of that file. Now here we
are dealing with a new untracked file as you can see up here,
that's why we don't have any code on the left side. Now we
can stage this file by clicking on the plus icon. If we made a
mistake, we can always on stage a file that's very easy. All we
have to do is to click on the minus icon. Now we have local
changes in our working directory. So let's go ahead and
stage this file one more time. Let's say we have reviewed our
changes and we want to proceed to make a commit. Up here we can
type a commit message. So for this demo, we can say, add,
file, one dot j s, just remember, this is not a good
commit message, because our commits should be based on
logical units of work, not individual files added or
removed. Okay, so let's go ahead and make a commit. Good. Now,
back to the Explorer panel. We have a fairly new feature here.
I think they introduced it a couple of months ago. If we
click on a file, and then open the timeline folder, we can see
all the commits apply to this file. So here's our latest
commit. At file one, we can click on that commit to see the
changes introducing that commit. Here's the previous commit
delete file one dot js. We also had another commit earlier,
refactor code is pretty helpful. Here by default, we don't have a
way to look at our history. We need to install a plugin to do
that. I'm going to talk about that in the next section.