Introduction
When you work with Git, your project files can be in two main states: clean or dirty. A clean working directory means all your changes are saved and tracked, while a dirty one means you have changes not yet saved or tracked. Understanding this helps you avoid losing work or committing unfinished changes.
When you want to check if you have unsaved changes before committing.
When you want to make sure your project is ready to share with others.
When you want to avoid committing temporary or incomplete changes.
When you want to clean up your project before switching to another task.
When you want to confirm that your last commit included all your changes.