Git Common Commands Quick Reference (Part 1)

Machine-translated (anthropic, claude-haiku-5-5) from the Chinese original. Read the original in 中文

I. Git Command Quick Reference

CommandBrief Description
git addAdd to staging area
git add–interactiveInteractive add
git applyApply a patch
git amApply patches in email format
git annotateSynonym, equivalent to git blame
git archiveArchive and package files
git bisectBinary search
git blameTrace file line by line
git branchBranch management
git cat-fileTool for inspecting repository objects
git checkoutCheck out to working tree, switch or create branches
git cherry-pickCherry-pick commits
git citoolGraphical commit, equivalent to the git gui command
git cleanRemove untracked files from the working tree
git cloneClone a repository
git commitCommit
git configQuery and modify configuration
git describeDisplay commit ID intuitively via tags
git diffCompare differences
git difftoolInvoke a graphical diff tool
git fetchFetch commits from a remote repository
git format-patchCreate email-format patch files. See the git am command
git grepTool for searching and locating file contents
git guiTcl/Tk-based graphical tool, focused on operations such as committing
git helpHelp
git initInitialize a repository
git init-db *Synonym, equivalent to git init
git logShow commit log
git mergeMerge branches
git mergetoolGraphical conflict resolution
git mvRename
git pullPull commits from a remote repository
git pushPush to a remote repository
git rebaseRebase branches
git rebase–interactiveInteractive branch rebase
git reflogManage records of reference changes such as branches
git remoteManage remote repositories
git repo-config *Synonym, equivalent to git config
git resetReset the branch pointer
git rev-parseConvert various reference notations into hash values, etc.
git revertRevert commits
git rmDelete files
git showShow various types of objects
git stage *Synonym, equivalent to git add
git stashSave and restore work in progress
git statusShow working tree file status
git tagTag (milestone) management

Comments