Need Assistance?

support@tutorialshub.in

Git Fundamentals

Git status and the working tree

ADVERTISEMENT
Git Free Lesson
5 min read
ADVERTISEMENT

Why git status is your first diagnostic command

git status tells you which branch you are on, whether files are untracked, which changes are staged and which changes are still only in the working tree.

Read status before acting

A file shown as modified but not staged will not be included in the next commit. A file shown under changes to be committed will be included. This distinction prevents accidental commits and is one of the most important habits for beginners.

Use status frequently

Run git status before staging, before committing and whenever you are unsure what Git currently sees. It is safer to inspect the state than to run a destructive command from memory.

ADVERTISEMENT