Displays the state of the working directory and the staging area.
| Option | Description |
|---|---|
| -s, --short | Output in short format |
| -b, --branch | Show branch information as well |
| --ignored | Show ignored files as well |
Examples:
git status - Display the current state of the working directorygit status -s - Display status in short formatgit status -sb - Display status in short format including branch information
Adds changes to the staging area (index).
| Option | Description |
|---|---|
| -A, --all | Stage all changes |
| -p, --patch | Interactively select changes to stage |
| -u, --update | Stage only tracked files |
Examples:
git add file.txt - Stage a specific filegit add . - Stage all changes in the current directorygit add -A - Stage all changes in the repositorygit add -p - Interactively select changes to stage