Interactive Git Cheatsheet
Master Git with our interactive visual cheatsheet. Learn commands through flow diagrams, build custom snippets with flags, and find emergency recovery tips.
How to Use
The Interactive Git Cheatsheet is a modern visual reference for developers of all skill levels. Use it to understand how Git manages your code and to quickly build correctly formatted commands.
How to use this tool
- Visual Zone Filtering: Click on one of the four areas (Workspace, Staging, Local Repo, or Remote) in the top flow map to see only the commands that interact with that zone.
- Interactive Command Builder: Every command card features a real-time terminal block. Toggle flags like
--amendor--forceto see the command string update instantly. - Search & Categorize: Use the sidebar to filter by category (Basics, Branching, etc.) or use the search bar to find commands by keyword.
- One-Click Copy: Once you've configured your command with the desired flags, click the copy icon to grab the snippet for your terminal.
- Emergency Recovery: Check the "Recovery Scenarios" in the sidebar for quick solutions to common Git mistakes.
About This Tool
The 4 Areas of Git
Understanding Git becomes much easier when you visualize it as data moving between four distinct environments:
- Workspace: Your local file system where you edit code.
- Staging (Index): A temporary area where you prepare changes for the next commit.
- Local Repo: The
.gitdirectory on your machine containing your full commit history. - Remote Repo: A shared version of the repository hosted on a server (like GitHub or GitLab).
Why Use This Tool
Why an Interactive Cheatsheet?
Static PDF cheatsheets are great for printing but fail to show the **dynamic nature** of Git. This tool bridges the gap by providing a functional CLI builder and a visual mental model. By interacting with the flow map, you develop an intuitive understanding of *where* your code is at any given step, reducing the risk of accidental data loss or "merge hell."