Moving Uncommitted Changes With Git

Sometimes when working on some code you realize that you’re not working in the correct branch. You definitely don’t want to begin copying and pasting changes. So why not just use a Git stash? These 3 lines of code will grab your uncommitted changes and transfer to the branch you want.

git stash
git checkout branch-you-want-changes-in
git stash pop