So you'll learn how to get the status of the working directory
and the staging area using the status command. The output of
this command is very comprehensive, but it's also
very wordy. So as an alternative, we can supply the
short status flag or dash s. Let me walk you through a few
examples. So for this demo, we're going to modify one of our
existing files, and then add a new file. So Eiko sky, to file
one dot j, s, so we're appending a sky to file on the J s. Now
let's create a new file. So once again, Aiko sky to file to the J
s. Now let's run git status. We have modified five one, and we
have a new untracked file. So as you can see, the output of this
command is very comprehensive, but also very wordy. Now, let's
run git status dash s. This is much easier to dies. So let me
show you how this works. Here we have two columns. The left
column represents the staging area The right column represents
the working directory. So we have modified file one. And
that's why we haven't read em in the right column, which is the
working directory. So we have some changes here. But these
changes are not in the staging area. That's why we don't have
anything in the left column. Now file three is a new file. That's
why we have two question marks in both this columns. Now, let's
add file one to the staging area. So get Add File one, and
then do another short status. Look. For file one, we have a
green m in the left column or the staging area column. So all
the changes that we had in the working area are now in the
staging area. in the right column, we don't have anything
we don't have any extra changes. That earlier in this section, I
told you that made me a stage of file, get takes a snapshot of
that file and puts it in the staging area. So if we modify
that file after we have to restate the changes, let me show
you this one more time. So I want to modify a file one more
time. Let's echo ocean to File one dot j s, and then run git
status dash s, look what we have here. So in the left column, we
have a green arrow, which means we have some changes in the
staging area, we have some additional changes in the
working directory that are not added to the staging area. Okay,
so let's add file one to the staging area one more time. And
then run git status dash rats, the all the changes that we had
in the working directory are now in the staging area. So we're
done with file one. Let's look at file two. So I'm going to add
file two to the staging area as well. And then run git status
dash s. For file two, we haven't green a in the left column,
which represents added. So file two is added and file one is
modified and this is how the short status output works.