Skip to main content

Git

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 Init

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.

Git: Delete Last Commit

How to undo a Git commit using git reset --soft, --mixed, or --hard for unpushed commits, and git revert for commits already pushed to a shared remote.

Git – Autocorrect Spelling

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.