git config --global user.name "[name]"Sets the name you want attached to your commit transactions.
git config --global user.email "[email]"Sets the email you want attached to your commit transactions.
git initCreates a new local repository.
git clone [url]Downloads a project and its entire version history.
git statusLists all new or modified files to be committed.
git add [file]Snapshots the file in preparation for versioning.
git commit -m "[message]"Records file snapshots permanently in version history.
git logLists version history for the current branch.
git diffShows file differences not yet staged.
git branchLists all local branches in the current repository.
git checkout -b [branch-name]Creates a new branch and switches to it.
git switch [branch-name]Switches to the specified branch.
git merge [branch]Combines the specified branch's history into the current branch.
git branch -d [branch-name]Deletes the specified branch.
git remote add [name] [url]Adds a new remote repository.
git fetch [remote]Downloads all history from the remote repository.
git pullFetches and merges any commits from the remote to the local branch.
git push [remote] [branch]Uploads local repository content to a remote repository.
git reset [file]Unstages the file, but preserves its contents.
git revert [commit]Creates a new commit that undoes the changes from a previous commit.
git reset --hard [commit]Discards all local changes and resets to the specified commit.
git stashTemporarily stores all modified tracked files.
git stash popRestores the most recently stashed files.
git worktree add [path] [branch]Adds a new worktree at the specified path, checking out the specified branch.
git worktree listLists the details of each worktree.
git worktree remove [path]Removes the worktree at the specified path.
git worktree pruneRemoves information for worktrees that no longer exist on the disk.
Find Git commands by keyword or topic.
Short, practical explanations for quick recall.
Practical examples for common workflows.
No data is sent or stored.
Teach common Git workflows to new team members.
Quickly recall commands for commit, branch, and merge.
Look up commands to resolve conflicts or undo changes.
Link to command references in internal docs.
Type a command like git rebase or git reset.
Read the description and example usage.
Use the command in your repo with confidence.