Create new branch from stashed code in Git
Case / Problem
You work on new things just to realize you code on the wrong branch
Solution
Stash the code then create a new branch from the stash
git stash
git stash branch <new-branch-name> stash@{0}
dr.codes1 min read