Git Cheatsheet

Git Cheatsheet

Quick reference for common Git commands

git init

Initialize a new Git repository

Setup
git clone <url>

Clone a remote repository

Setup
git config --global user.name "name"

Set global username

Setup
git config --global user.email "email"

Set global email

Setup
git status

Show working tree status

Snapshot
git add <file>

Stage file changes

Snapshot
git add .

Stage all changes

Snapshot
git commit -m "message"

Commit staged changes

Snapshot
git reset <file>

Unstage a file

Snapshot
git reset --hard

Discard all uncommitted changes

Snapshot
git stash

Temporarily save changes

Snapshot
git stash pop

Restore stashed changes

Snapshot
git branch

List all local branches

Branch
git branch <name>

Create a new branch

Branch
git checkout <branch>

Switch to a branch

Branch
git checkout -b <branch>

Create and switch to branch

Branch
git branch -d <branch>

Delete a branch

Branch
git switch <branch>

Switch branches (modern)

Branch
git merge <branch>

Merge branch into current

Merge
git rebase <branch>

Rebase current branch

Merge
git cherry-pick <commit>

Apply specific commit

Merge
git remote -v

Show remote repositories

Remote
git remote add origin <url>

Add remote origin

Remote
git push origin <branch>

Push to remote

Remote
git pull

Pull from remote

Remote
git fetch

Fetch from remote without merging

Remote
git log --oneline

Compact commit history

Log
git log --graph

Branch graph history

Log
git diff

Show unstaged changes

Log
git diff --staged

Show staged changes

Log
git show <commit>

Show commit details

Log
git revert <commit>

Create new commit undoing changes

Undo
git reset HEAD~1

Undo last commit (keep changes)

Undo
git reset --hard HEAD~1

Undo last commit (discard changes)

Undo
git clean -fd

Remove untracked files

Undo
git tag

List all tags

Tag
git tag <name>

Create lightweight tag

Tag
git tag -a <name> -m "msg"

Create annotated tag

Tag
git push --tags

Push tags to remote

Tag

What is Git Cheatsheet?

Built for developers who want to format code, convert encodings, check syntax, and handle other everyday dev tasks — fast. Everything runs right in your browser, so there is nothing to install. Just open the page, paste your code, and get your result instantly. No signup, no waiting, no hassle.

Use Cases

  • Cleaning up messy code before a commit
  • Inspecting API responses during debugging
  • Switching between encoding formats
  • Quick prototyping without setting up a project
  • Spotting syntax errors before they cause headaches

How to Use

  1. 1Open the Git Cheatsheet — no signup, no login.
  2. 2Paste your input or drag and drop a file.
  3. 3Hit Process or Generate and see results instantly.
  4. 4Preview the output and click Copy to grab it.
  5. 5💡 Pro Tip: Check the FAQ below for power-user tricks.
  6. 6📌 Bookmark this page — you will want to come back.

Features

  • Completely free
  • No account needed
  • Runs in your browser
  • Instant results
  • Copy with one click
  • Your data stays private
  • Works on any device
  • Built for devs

FAQ

Is this tool free?

Yep — completely free. No accounts, no paywalls, no catch. Just open the page and go.

Does my code get sent to a server?

Nope. Everything runs right in your browser. Your code never leaves your device.

What formats does it support?

All the common ones — JSON, XML, Base64, JWT, YAML, and more. If it is a data format developers use, chances are we support it.

Does it work on my phone?

Absolutely. Works great on phones, tablets, and desktops alike.

How fast is it?

Instant for most inputs. If you paste something really large, it might take a second or two.

Do I need to be online?

You need the internet to load the page the first time. After that, it works offline.