1 00:00:03,990 --> 00:00:06,870 So you'll learn how to get the status of the working directory 2 00:00:06,870 --> 00:00:10,110 and the staging area using the status command. The output of 3 00:00:10,110 --> 00:00:12,210 this command is very comprehensive, but it's also 4 00:00:12,210 --> 00:00:15,180 very wordy. So as an alternative, we can supply the 5 00:00:15,180 --> 00:00:18,750 short status flag or dash s. Let me walk you through a few 6 00:00:18,750 --> 00:00:22,440 examples. So for this demo, we're going to modify one of our 7 00:00:22,440 --> 00:00:28,350 existing files, and then add a new file. So Eiko sky, to file 8 00:00:28,350 --> 00:00:33,780 one dot j, s, so we're appending a sky to file on the J s. Now 9 00:00:33,780 --> 00:00:38,340 let's create a new file. So once again, Aiko sky to file to the J 10 00:00:38,340 --> 00:00:43,410 s. Now let's run git status. We have modified five one, and we 11 00:00:43,410 --> 00:00:47,010 have a new untracked file. So as you can see, the output of this 12 00:00:47,010 --> 00:00:50,580 command is very comprehensive, but also very wordy. Now, let's 13 00:00:50,580 --> 00:00:55,170 run git status dash s. This is much easier to dies. So let me 14 00:00:55,170 --> 00:00:58,050 show you how this works. Here we have two columns. The left 15 00:00:58,050 --> 00:01:01,230 column represents the staging area The right column represents 16 00:01:01,230 --> 00:01:05,130 the working directory. So we have modified file one. And 17 00:01:05,130 --> 00:01:07,890 that's why we haven't read em in the right column, which is the 18 00:01:07,890 --> 00:01:10,980 working directory. So we have some changes here. But these 19 00:01:10,980 --> 00:01:14,610 changes are not in the staging area. That's why we don't have 20 00:01:14,640 --> 00:01:18,300 anything in the left column. Now file three is a new file. That's 21 00:01:18,300 --> 00:01:22,770 why we have two question marks in both this columns. Now, let's 22 00:01:22,770 --> 00:01:27,720 add file one to the staging area. So get Add File one, and 23 00:01:27,720 --> 00:01:31,890 then do another short status. Look. For file one, we have a 24 00:01:31,890 --> 00:01:35,700 green m in the left column or the staging area column. So all 25 00:01:35,700 --> 00:01:38,310 the changes that we had in the working area are now in the 26 00:01:38,310 --> 00:01:41,370 staging area. in the right column, we don't have anything 27 00:01:41,400 --> 00:01:44,490 we don't have any extra changes. That earlier in this section, I 28 00:01:44,490 --> 00:01:47,520 told you that made me a stage of file, get takes a snapshot of 29 00:01:47,520 --> 00:01:50,970 that file and puts it in the staging area. So if we modify 30 00:01:50,970 --> 00:01:54,390 that file after we have to restate the changes, let me show 31 00:01:54,390 --> 00:01:57,330 you this one more time. So I want to modify a file one more 32 00:01:57,330 --> 00:02:02,970 time. Let's echo ocean to File one dot j s, and then run git 33 00:02:02,970 --> 00:02:07,350 status dash s, look what we have here. So in the left column, we 34 00:02:07,350 --> 00:02:10,170 have a green arrow, which means we have some changes in the 35 00:02:10,170 --> 00:02:13,470 staging area, we have some additional changes in the 36 00:02:13,470 --> 00:02:16,920 working directory that are not added to the staging area. Okay, 37 00:02:17,340 --> 00:02:21,660 so let's add file one to the staging area one more time. And 38 00:02:21,660 --> 00:02:26,430 then run git status dash rats, the all the changes that we had 39 00:02:26,430 --> 00:02:29,910 in the working directory are now in the staging area. So we're 40 00:02:29,910 --> 00:02:33,870 done with file one. Let's look at file two. So I'm going to add 41 00:02:33,870 --> 00:02:38,910 file two to the staging area as well. And then run git status 42 00:02:39,180 --> 00:02:43,590 dash s. For file two, we haven't green a in the left column, 43 00:02:43,800 --> 00:02:47,490 which represents added. So file two is added and file one is 44 00:02:47,490 --> 00:02:50,610 modified and this is how the short status output works.