explaingit

git-tips/tips

21,694JavaScriptAudience · developerComplexity · 1/5MaintainedLicenseSetup · easy

TLDR

A community-curated collection of practical Git commands and tricks organized by task, with a companion CLI tool for quick terminal lookup.

Mindmap

mindmap
  root((repo))
    What it does
      Git command cheat sheet
      Task-focused tips
      Organized by category
    Use cases
      Remember forgotten syntax
      Learn new Git tricks
      Quick reference lookup
    Audience
      Beginners learning Git
      Experienced developers
      Anyone using version control
    Tech stack
      Git shell commands
      JavaScript
      npm CLI tool
    Access methods
      Web repository
      CLI tool git-tip
      Multiple languages

Things people build with this

USE CASE 1

Look up the exact Git command syntax when you remember what you want to do but not how to do it.

USE CASE 2

Discover Git tricks and shortcuts you didn't know existed to work faster with version control.

USE CASE 3

Build a mental model of Git as a beginner by learning commands organized by practical task.

USE CASE 4

Quickly find advanced techniques like cherry-picking commits or using binary search to find bugs.

Tech stack

GitJavaScriptNode.jsnpm

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose including commercial, as long as you keep the copyright notice.

In plain English

This repository is a community-curated cheat sheet of practical Git commands and tricks. Git is the version-control system used by most software projects to track changes to files, manage branches, and coordinate work between multiple people. While Git is enormously powerful, it has dozens of subcommands and obscure flags, and even experienced developers regularly forget the exact incantation for something they only do once in a while. The project gathers the most commonly needed of those incantations in one place. The content itself is a long list of short tips, each one pairing a sentence describing what you want to do with the exact Git command that does it, things like quickly switching to your previous branch, deleting a remote branch or tag, undoing local changes, rewriting the previous commit message, staging only parts of a changed file, cherry-picking commits across branches, recovering a deleted file, creating new worktrees, finding which commit introduced a bug using binary search, and force-pushing safely. The tips are grouped into sections like Basic Operations, Branching, and Log and History. All commands were tested on git version 2.7.4. You would use it as a quick reference whenever you think "I know Git can do this, but I can't remember how." Alongside the written list, the project offers a companion command-line tool called git-tip, published on NPM, that lets you browse the same tips from your terminal, and an interactive GitBook version is linked. The README also points to community translations into Chinese, Russian, Korean, Vietnamese, Japanese, Nepali, Polish, and Persian. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
Show me how to use the git-tips repository to find the command for undoing local changes without losing my work.
Prompt 2
I want to clone a large repository but save disk space, what Git command does git-tips recommend?
Prompt 3
How do I use the git-tip npm CLI tool to browse Git tips interactively in my terminal?
Prompt 4
What's the git-tips command to switch back to the previous branch I was working on?
Prompt 5
Show me how to cherry-pick a single commit from another branch using the git-tips reference.
Open on GitHub → Explain another repo

Generated 2026-05-21 · Model: sonnet-4-6 · Verify against the repo before relying on details.