Command Hub
Git Command Topics
Enter a dedicated command hub first, then move from the grouped overview into each command detail page.
Command Reference
Core Commands
Start with the everyday commands for repository setup, inspection, committing, syncing, and branch movement.
git init Tutorial
Explains how git init creates a repository, how the initial branch is defined, and how it is used for both new and existing directories.
git clone Tutorial
Explains how git clone copies a repository, what origin means by default, and what local branch setup usually looks like after cloning.
git status Tutorial
Covers how git status shows working tree, staging area, and branch state, and why it should be part of nearly every Git workflow.
git add Tutorial
Explains how git add stages changes for the next commit, and why the index is central to creating cleaner history.
git commit Tutorial
Explains how git commit creates new history nodes, how to write useful messages, and when amend is appropriate.
git diff Tutorial
Explains how git diff compares working tree, index, and commit states, and which forms are most useful day to day.
git show
Inspect a specific commit, tag, or object in detail, making it one of the most useful commands for reading history precisely.
git log Tutorial
Shows how git log inspects commit history, graph structure, authorship, and filtered history for debugging and review.
git rm
Remove tracked files and stage that removal, which makes it easier to separate filesystem deletion from Git history changes.
git mv
Rename or move tracked files while keeping the index in sync, which makes large refactors easier to stage consistently.
git fetch Tutorial
Explains how git fetch updates remote refs, why it is often safer than pull, and where it fits in a daily sync workflow.
git pull Tutorial
Explains git pull as fetch plus integration, and why many teams prefer fetch-first or ff-only synchronization habits.
git push Tutorial
Explains how git push publishes local branches, how upstream tracking works, and why force-with-lease is safer than raw force push.
git switch Tutorial
Introduces git switch as the dedicated branch-switching command and clarifies how it differs from checkout.
git branch Tutorial
Covers how git branch lists, creates, renames, and deletes branches, and how it relates to remote-tracking branches.
git tag Tutorial
Introduces git tag for release points, explains lightweight versus annotated tags, and covers basic tag publishing.
git remote Tutorial
Explains how git remote lists, adds, renames, and removes remote definitions, and how origin fits into common collaboration flows.
Command Reference
Advanced Commands
Then move into commands that affect history shape, undo strategy, and operational risk.
git rebase Tutorial
Explains the core model of git rebase, recommended workflows, risks, and recovery options.
git merge Tutorial
Explains the purpose of git merge, the difference between fast-forward and merge commits, and how to handle conflicts.
git cherry-pick Tutorial
Explains how to apply a selected commit onto the current branch and when cherry-pick is the right tool.
git reset Tutorial
Explains how git reset moves HEAD, updates the index, and optionally overwrites the working tree through soft, mixed, and hard modes.
git stash Tutorial
Explains how to temporarily shelve local changes with git stash and later inspect, restore, or remove stash entries.
git restore Tutorial
Explains how git restore recovers file state in the working tree or index, and how it differs from reset and checkout.
git revert Tutorial
Explains why git revert is the safe way to undo shared commits, and how it differs from reset at the history level.
git reflog
Read reference movement history, which makes reflog one of the most important commands for recovery after reset, rebase, and branch mistakes.
git bisect
Use binary search across history to locate the commit that introduced a regression, making it one of the most valuable debugging commands in Git.
git blame
Track which commit last changed each line in a file, making it useful for recovering context around why a line looks the way it does now.
git checkout Tutorial
Explains git checkout as the older multi-purpose command for branch switching and path restoration, and how it relates to switch and restore.
git clean Tutorial
Explains how git clean removes untracked files and directories, and why dry-run and force flags are essential here.