August 13, 2015
One of the great things about GIT is the ease of branching locally. So it is a great idea to branch for each bug fix and feature and then merge those into master when they are fully tested and ready. But what if you get a bug report and go to town on it realizing midway through that you are working on Master?
Enter GIT Stash
Git Stash will move your un committed changes to a special place and revert the branch back to it’s last commit. So before committing your work, you can do this:
Git Stash Pop will grab the last stash and bring it into the current branch. You can now commit to the branch, test and then merge to master when you are ready.
There may be better ways but I do this, feel free to comment below.