Git Tips Slides
PageUp x2: previous · PageDown x2: next · Home: index

git stash

git stash is like a backpack.

Example: You started to code. Then you realize (before you commit) that you work on the main branch. But you want to move that work onto a feature branch first. You can git stash your uncommitted changes, switch to or create the branch you actually want, and then use git stash pop to bring the changes back.