Let’s say you’re coding on your development branch. And you get a notice that there’s a bug on the production branch.

You want to check for the bug, but you don’t want to lose the work you’ve created on the development branch. You also don’t want to commit what you’ve written because they’re not done yet.

What do you do? You can’t commit and you can’t switch branches. If you switch branches, things that aren’t committed will flow over to the branch you switched to.

#git 

 

Find out how to Use Git Stashes As A Temporary Storage
2.75 GEEK