Junior
From PDF
Version Control
Git & GitHub
What is git stash, and when would you use it?
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.
Share this Q&A
Share preview image: https://www.toolliyo.com/images/toolliyo-logo.png