What is git stash, and when would you use it? Follow:
Short answer: git stash temporarily saves your uncommitted changes so you can work on something else without committing unfinished work. Example: You’re fixing a login bug but suddenly need to switch branches to fix a production issue. Instead of committing half-done code, you run: git stash git checkout main Later, you can come back and reapply your stashed work.
Real-world example (ShopNest)
ShopNest’s team uses GitHub PRs with reviews and CI checks so broken builds never reach production unnoticed.
Say this in the interview
- Define — one clear sentence (the short answer above).
- Example — relate it to a project like ShopNest or your real work.
- Trade-off — when you would not use it.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png