From the course: Git Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Git status

Git status

- Now that we know how to use Git, let's explore how we interact with our files. First, I want to show some tips on how to make it easier to keep track of what is happening. One of the most powerful commands in Git is git status. We have seen it before in a previous chapter, but I want to take the time to look at how it can help us. git status gives you a clear overview of your repository's current state. It also often suggests what you might need to do next, especially if you run into an issue. Let's see it in action. Right here, I created a new file, gitStatusDemo.md It is added to my local folder, but Git doesn't track it yet. When I use git status, it shows that there's an untracked file, meaning it hasn't been added to the staging area. Git even tells me what I can do. I can use git add, filename, to include it in the next commit. So let's do that. I'll type git add gitStatusDemo.md, and now I'll run git status again. Now, Git tells me that there are changes ready to be…

Contents