- untracked: new files in a directory that has not been tracked (excluding ignored files)
- unstaged: new changes on tracked files that have not been staged or stashed
- staged (new file): staged new files that does not exists in local or remote repository (e.g. using
git addcommand) - staged: staged changes (excluding new files) (e.g. using
git addcommand) - committed: new files or changes that have been committed (e.g. using
git commitcommand) - published: pushed commits (using
git pushcommand)
Follow the colors to see how you can traverse between different states.
Using git restore . discards changes on unstaged changes and does not affect untracked or staged, or committed changes.
git reset --mixed HEAD~1 causes newly added files that have been staged to be untracked and also unstage all commited or staged changes


