How do you check the status of your Git repository?

How do you check the status of your Git repository?

a) git check
b) git status
c) git info
d) git log

Answer:

b) git status

Explanation:

The git status command displays the state of your working directory and staging area. It shows which files are staged for the next commit, which are modified but not yet staged, and which are untracked by Git.

This command is crucial for keeping track of changes in your project and ensuring that you know what will be committed or what still needs to be added to the staging area.

Regular use of git status helps prevent mistakes by giving you a clear picture of the current state of your repository.

Reference:

Top 100 Git and GitHub MCQ Questions and Answers

Scroll to Top