Kharabeesh
On-device ع

Git Cheat Sheet

The Git commands you actually need, grouped by task: setup, branches, merging, undoing mistakes, stash, rebase and remotes. Search by task, fill in your branch names and copy a ready command.

Free, no sign-up Your data stays on your device Works offline after first open

The tool

Loading the tool…

How to use

  1. Type what you want to do (such as “undo” or “new branch”) or part of a command, or pick a group.
  2. Fill in your branch, repo URL and file under “Fill the placeholders” and every command updates.
  3. Copy a command into your terminal. Commands tagged “careful” can delete work.

Privacy & how it works

Processes your data in the browser and stores nothing.

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

What is the difference between reset and revert?

reset moves the branch back and rewrites history (fine before you push). revert adds a new commit that undoes the old one, so it is safe after others pulled your work.

I ran reset --hard by mistake. Is my work gone?

Commits can usually be recovered: run git reflog, find the commit before the mistake and git reset --hard to it. Changes that were never committed cannot be recovered.

Why switch instead of checkout?

Since Git 2.23, switch handles branches and restore handles files, because checkout did both and was confusing. checkout still works.

Do these commands work on Windows?

Yes, in Git Bash and PowerShell. Watch the quoting in PowerShell, and use " rather than ' in cmd.

Formulas & sources

Related tools