Saving Half-Done Work with Git Stash

Imagine that you are working on a part of a project and it starts getting messy. There is an urgent bug that needs your immediate attention. It is time to save your changes and switch branches. The problem is, you don’t want commit half-done work. The solution is git stash.

Stashing is handy if you need to quickly switch context and work on something else but you’re mid-way through a code change and aren’t quite ready to commit. — Bitbucket