rabi.
  • Home
  • Writing
  • Snippets
  • Tools
  • YouTube
Snippets

Snippets / Tags

git

5 git code snippets across 1 language. Copy-paste solutions from production code.

5

snippets

git

5 snippets

Find the Bad Commit with git bisect

Use git bisect to binary-search through commits and find the exact one that introduced a bug or test failure.

gitbisectdebugging+2
INTERMEDIATEMay 14, 2026

Recover a Deleted Git Branch with reflog

Use git reflog to find and restore a branch you accidentally deleted with git branch -D or a botched rebase.

gitreflogrecovery+2
INTERMEDIATEMay 2, 2026

Squash the Last N Commits with Interactive Rebase

Use git rebase -i to squash, reorder, edit, or drop the last N commits before pushing or opening a pull request.

gitrebasesquash+2
INTERMEDIATEApr 22, 2026

Undo the Last Git Commit (Keep or Discard Changes)

How to undo the most recent git commit using git reset, with --soft, --mixed, and --hard explained side by side.

gitresetundo+2
BEGINNERApr 10, 2026

Useful git stash Patterns Beyond stash and pop

Stash with a message, stash untracked files, list stashes, apply a specific stash, and stash a single file. The full git stash workflow.

gitstashworkflow+2
BEGINNERMay 22, 2026
rabi.

Building production software and writing about what I figure out.

SDE II at Amazon

Content

  • Writing
  • Snippets
  • Tools
  • YouTube

Snippets

  • Java
  • AWS CLI
  • React

Popular Tags

  • React Hooks
  • TypeScript
  • Spring Boot
  • Next.js

Explore

  • About
  • Professional Journey
  • Contact
  • Search
  • Submit a Snippet
  • RSS Feed

Connect

Let's build something together.

Send a message →

Newsletter

Weekly posts on backend engineering and system design.

Subscribe →

© 2026 Rabinarayan Patra. All rights reserved.

Privacy PolicyDisclosureBuilt with Next.js