Chris Collins

Tools · dev

Git helper

Searchable "how do I…" git recipes with safety notes, a .gitignore generator with a path tester, a Conventional Commits builder and linter, and .gitattributes and branch-name generators.

Added

How to use it
  • How do I… — about sixty recipes for the things people search for: undo a commit (pushed or not), discard changes, recover a lost branch, rename and clean up branches, rebase versus merge, push after a rebase, squash, bisect, remove a leaked secret from history, worktrees, sparse checkouts. Type a few words to filter. Recipes marked careful rewrite history or discard work: read the note first, and remember git reflog can usually bring back a commit you lost.

  • .gitignore — tick operating systems, editors, languages, embedded and game-engine tools (templates condensed from GitHub’s github/gitignore collection), add your own patterns, and download the merged, de-duplicated file. Type paths in Test paths to see which are ignored and by which rule — negations (!), anchored patterns (/build), directory patterns (dist/), and ** work as in git. git check-ignore -v <path> is the final word.

  • Commit messages — build a Conventional Commit: type, optional scope, ! and a BREAKING CHANGE: footer for breaking changes, a body wrapped at 72 columns, and footers such as Closes #12. The linter checks the header format, length (50 ideal, 72 maximum), the blank line after the header, imperative mood, and full stops, and says which semantic-version bump the message implies (feat → minor, fix → patch, breaking → major). Paste any message into Check a message to lint it. Copy as command gives a git commit -F - heredoc ready for the terminal.

  • .gitattributes & branches — presets for line-ending normalisation, binary files, Git LFS for media and CAD, retro disk images, language-aware diffs, and collapsing generated files on GitHub; and a branch-name maker (feature/142-add-dark-mode).

Sharing

Share link copies a URL that opens this tool exactly as you have it. Hand-written links work too: How do I… ?q=undo&cat=Undo, .gitignore ?templates=Node,macOS&extra=…&test=…, Commit messages ?type=fix&scope=api&subject=…&body=…&breaking=1&note=…&footers=…, .gitattributes & branches ?attrs=…&kind=fix&desc=…&issue=…. For example ?templates=Python.

Recipes marked See it happen open the matching exercise in the Git trainer, where you can run the commands on a practice repository and watch the commit graph change.

Related: Git, visualised (learn by doing) · Git client (browse a repository in the browser).

Runs entirely in your browser; nothing you type leaves this page.