Python for Entrepreneurs Transcripts
Chapter: Digging Further into Git
Lecture: Git status

Login or purchase this course to watch this video and the rest of the course contents.
0:01 We're going to dig into all the fundamental commands that are part of Git.
0:04 You can think of commands like "git status" as the building blocks
0:07 for how to use the Git version control system;
0:10 now the best way to get comfortable with these commands is
0:12 just to get to the command line and start working.
0:15 At the end of the previous chapter, we cloned the Git repository
0:18 that has all the demos for this course,
0:20 change into that directory if you are not already there, because we cloned
0:23 a Git repository, this is already enabled to use all the Git commands;
0:26 "git status" tells us all the changes that have happened in the Git repository
0:30 since our last commit. In this case, there is nothing to commit,
0:32 because we just cloned a repository, we haven't changed any files.
0:36 If we were to create a new file in this repository,
0:38 then "git status" would show us that that file has not yet been committed to the index.
0:42 Let's do that now, I am going to say "touch newfile",
0:46 and this is just an example of a generic file, and now if we say "git status",
0:49 it's going to say this file, newfile is untracked.
0:52 Every file that is new or has modifications that has not yet been added to Git
0:56 will show up in this list. If we delete this file
0:59 before it's added to the Git repository, then it will disappear from this list.
1:03 So if we remove new file, and then again we type "git status", we'll see
1:08 nothing to commit, there is no list of new files or file modifications
1:12 because within this directory and all the subdirectories that Git is tracking
1:15 in this repository, nothing has been changed, that is really all there is to it,
1:19 when you're working with the "git status" command.
1:21 Git status is one of those commands you don't even really think about all that much,
1:24 when you've been using Git for a long time, it just becomes an intuitive command
1:27 so that you can check which files you've been working on
1:29 and what you need to add and commit to your Git repository.
1:33 One handy feature you can use to get yourself familiar with all these commands
1:36 and the flags that you can set on them, is to use "git --help"
1:41 and then the name of the command, so in our case, "status".
1:44 This brings up the man page that will explain what the command does
1:48 and any options that are available as arguments, scroll through the page
1:51 using the space bar, and type "q" in order to escape, that is "git status",
1:55 it's one of our helpful building blocks for working with Git.