Interactive Git Commands Cheatsheet
Developer UtilitiesComprehensive, searchable Git cheatsheet covering branch, commit, undo, stash, remote, and rebase operations.
Initialize Git Repository
basicCreates a new empty Git repository in the current folder.
Check Status
basicDisplays the status of tracked, modified, and staged files.
Stage All Changes
basicStages all modifications and untracked files for the next commit.
Record Commit
basicRecords staged snapshot with a descriptive message to history.
Create & Switch Branch
branchCreates a new branch and checks it out immediately.
List All Branches
branchLists all local and remote branches in the repository.
Merge Branch
branchMerges the specified branch into the currently active branch.
Delete Local Branch
branchDeletes a merged local branch (use -D to force delete).
Add Remote Origin
remoteLinks a remote repository URL to the local repository as origin.
Pull Changes from Remote
remoteFetches and merges the latest commits from remote origin into local branch.
Push to Remote
remotePushes local commits to the remote branch and sets upstream tracking.
Undo Last Commit (Keep Files)
undoRolls back the last commit while keeping modified code staged.
Unstage File
undoRemoves a file from the staging area without discarding modifications.
Discard All Local Changes
undoDiscards all uncommitted changes in tracked files permanently.
Stash Uncommitted Changes
stashSaves dirty working directory state temporarily for later use.
Apply & Drop Stash
stashRestores the most recently stashed changes back to your working tree.
Cherry-pick Commit
advancedApplies the exact changes from a specific commit into the current branch.
Amend Last Commit
advancedModifies the most recent commit message or combines newly staged files into it.
Pretty Git Log Graph
advancedVisualizes commit history and branches in a concise terminal graph.
Love ToolsApp? Buy Us a Coffee
ToolsApp operates 100% client-side with zero subscriptions and zero data tracking. We believe essential digital tools should remain free and accessible to everyone. Your coffee donations help us keep servers running and build new tools!
How to Use Interactive Git Commands Cheatsheet
Select Category
Pick Basics, Branching, Undoing, or Stash operations.
Find Scenario
Search for what you want to achieve with Git.
Copy Command
Copy the command directly to your terminal.
User Reviews & Feedback
Share your experience anonymously. Moderated automatically by AI.