Retrieving a Repository's Status
Learn how to retrieve a repository's status.
We'll cover the following
The git status
command#
As is often the case, git status
is your friend when retrieving a repository’s status:
1 git status
Remember this command! A quick git status
has gotten me out of many sticky situations with Git by telling me what was going on and what to do next.
Here, it’s telling you where the HEAD
is pointing at (the non-existent master branch) and that there is nothing to commit.
Status after creating a new file#
Create a file and check the status again:
2 touch mycode.py
3 git status
Untracked file(s)#
You are now informed that you have an untracked file. Git has detected that it exists, but the repository is not aware of it. To make Git aware of it, you will have to add it to the repository.
Looking at Repository's History
Add Files to a Repository
Mark as Completed
Report an Issue