Git Status
git status shows modified, staged, and untracked files in your repository. This guide covers the short format (-s), how .gitignore interacts with status output, and a full status-code reference table.
git status shows modified, staged, and untracked files in your repository. This guide covers the short format (-s), how .gitignore interacts with status output, and a full status-code reference table.
git init creates a new local Git repository. This guide covers the basic command, setting main as the default branch name with -b and init.defaultBranch, and a full flag reference.
Undo the last Git commit safely: amend, reset --soft/--mixed/--hard, recovering with reflog, revert for pushed commits, and --force-with-lease when you must rewrite. Every command was run on a real repository, with a script to reproduce each transcript.
Git's help.autocorrect setting can suggest, prompt for, or automatically run corrected commands after a typo. This guide covers its configuration values plus aliases, core.editor, and other global Git productivity settings.