Git Cheatsheet
Common git commands organized by category. Click to copy any command.
Getting Started
git initCopygit clone <url>Copygit clone <url> <dir>Copygit config --global user.name "name"Copygit config --global user.email "email"CopyStaging & Committing
git statusCopygit add <file>Copygit add .Copygit add -pCopygit commit -m "msg"Copygit commit -am "msg"Copygit commit --amendCopygit diffCopygit diff --stagedCopyBranching
git branchCopygit branch -aCopygit branch <name>Copygit checkout <branch>Copygit checkout -b <branch>Copygit switch <branch>Copygit switch -c <branch>Copygit branch -d <branch>Copygit branch -D <branch>Copygit branch -m <new>CopyMerging & Rebasing
git merge <branch>Copygit merge --no-ff <branch>Copygit rebase <branch>Copygit rebase -i HEAD~3Copygit rebase --abortCopygit rebase --continueCopygit cherry-pick <commit>CopyRemote
git remote -vCopygit remote add origin <url>Copygit fetchCopygit fetch --pruneCopygit pullCopygit pull --rebaseCopygit pushCopygit push -u origin <branch>Copygit push --forceCopygit push origin --delete <branch>CopyUndoing Changes
git restore <file>Copygit restore --staged <file>Copygit reset HEAD~1Copygit reset --hard HEAD~1Copygit reset --hard <commit>Copygit revert <commit>Copygit checkout -- <file>CopyLogging & History
git logCopygit log --onelineCopygit log --graph --onelineCopygit log -n 5Copygit log --author="name"Copygit log --since="2 weeks ago"Copygit blame <file>Copygit show <commit>Copygit shortlog -snCopyStashing
git stashCopygit stash push -m "msg"Copygit stash listCopygit stash popCopygit stash applyCopygit stash apply stash@{2}Copygit stash drop stash@{0}Copygit stash clearCopygit stash show -pCopyTags
git tagCopygit tag <name>Copygit tag -a <name> -m "msg"Copygit push origin <tag>Copygit push origin --tagsCopygit tag -d <name>CopyAdvanced
git bisect startCopygit bisect good <commit>Copygit bisect bad <commit>Copygit reflogCopygit clean -fdCopygit worktree add <path> <branch>Copygit submodule update --initCopyHow to Use Git Cheatsheet
- Paste your code or data into the input field
- Choose the operation you want to perform
- View the formatted, validated, or transformed output
- Copy the result or download if available
Why Use Git Cheatsheet?
Developer tools on FreeTools.one are designed to replace the dozen browser tabs you'd otherwise need. JSON formatting, regex testing, JWT decoding, SQL formatting, diff checking — everything runs in your browser with zero configuration. There's nothing to install, no CLI to learn, no Docker containers to spin up. Each tool provides professional-grade output with syntax highlighting, error detection, and one-click copy. Your code and data never leave your device because all processing happens client-side. These tools are built by developers, for developers, with the exact features you need: customizable indentation, multiple output formats, real-time validation, and keyboard shortcuts. They're fast enough for quick checks during coding sessions and powerful enough for production data transformation.
- No installation needed — works directly in your browser
- Client-side processing keeps your code private
- Professional-grade formatting and validation
- Save hours of manual coding and debugging
Frequently Asked Questions
Is my code sent to a server?
No. All processing happens in your browser. Your code never leaves your device.
Does it support syntax highlighting?
Yes. Output is displayed with proper formatting for easy reading.
Can I use this for production code?
Absolutely. The output is clean and ready for production use.