I was working on a git branch and was ready to commit my changes, so I made a commit with a useful commit message. I then absentmindedly made minor changes to the code that
Git stash save will save all your changes even if you switch between branches.
git stash save
Git checkout any other branch, now since you saved your changes you can move around any branch. The above command will make sure that your changes are saved.
git checkout branch
Now when you come back to the branch use this command to get all your changes back.