Use Stash When
You need to quickly clear your working tree to switch context.
The work is incomplete and not ready to become part of branch history yet.
How to choose between temporary local cleanup and recording real history.
Stash is for temporarily setting work aside without making it part of normal branch history. Commit is for recording work you want to keep, explain, and potentially share.
You need to quickly clear your working tree to switch context.
The work is incomplete and not ready to become part of branch history yet.
You want a durable checkpoint that belongs in project history.
You are ready to describe the change and possibly share it with others.
Stash hides work temporarily. Commit records it intentionally.