GitQuickRef Logo

GitQuickRef

Your daily Git cheat sheet.

History
git config

Configure user information for all local repositories.

git init

Initialize a new local Git repository.

git clone

Create a copy of a remote repository on your local machine.

git add

Add file changes in your working directory to the staging area.

git commit

Save your staged changes to the local repository.

git rm

Remove files from the working directory and the index.

git mv

Rename a file and update the Git index.

git status

List the status of your files: untracked, modified, or staged.

git branch

List, create, or delete branches.

git checkout

Switch to another branch or restore working tree files.

git merge

Merge a different branch into your active branch.

git fetch

Download objects and refs from another repository.

git pull

Fetch and merge changes from the remote repository to your local repository.

git push

Send your committed changes to a remote repository.

git remote

Manage the set of remote repositories.

git log

Show the commit history for the current branch.

git log --graph

Display the commit history as a text-based graph.

git shortlog

Summarize git log output in a more concise format.

git diff

Show changes between commits, commit and working tree, etc.

git show

Show various types of objects (blobs, trees, tags, and commits).

git blame

Show what revision and author last modified each line of a file.

git reset

Undo changes, by un-staging files or resetting the HEAD to a previous commit.

git stash

Temporarily store modified, tracked files in order to change branches.

git tag

Create, list, delete or verify a tag object signed with GPG.

git rebase

Reapply commits on top of another base tip.

git revert

Create a new commit that undoes the changes of a previous commit.

git cherry-pick

Apply the changes introduced by some existing commits.

git clean

Remove untracked files from the working directory.

git reflog

Show a log of changes to the local repository's HEAD. It's a safety net for recovering lost work.

git bisect

Use binary search to find the commit that introduced a bug.