Git Cheat Sheet

dayvster.com
git init
Initialize a local git repository
git clone
Clone a repository into a new directory
git remote
Manage set of tracked repositories
git add
Add files to the staging area
git commit
Commit changes to the repository
git push
Update remote refs along with associated objects
git pull
Fetch from and integrate with another repository or a local branch
git status
Check the status of the repository
git log
View the commit history
git branch
List, create, or delete branches
git checkout
Checkout a branch or paths to the working tree
git merge
Merge one or more branches into the current branch
git fetch
Download objects and refs from another repository
git stash
Stash the changes in a dirty working directory away
git reset
Reset current HEAD to the specified state
git rebase
Reapply commits on top of another base tip
git config
Get and set repository or global options
git diff
Show changes between commits, commit and working tree, etc
git tag
Create, list, delete or verify a tag object signed with GPG
git show
Show various types of objects
git mv
Move or rename a file, a directory, or a symlink
git rm
Remove files from the working tree and from the index
git clean
Remove untracked files from the working tree
git grep
Print lines matching a pattern
git archive
Create an archive of files from a named tree
git bisect
Use binary search to find the commit that introduced a bug
git blame
Show what revision and author last modified each line of a file
git shortlog
Summarize 'git log' output
git describe
Give an object a human readable name based on an available ref
git cherry-pick
Apply the changes introduced by some existing commits
git worktree
Manage multiple working trees