stuart-b
7/27/2016 - 8:16 AM

If you start working on a branch and then realise you're in the wrong one

If you start working on a branch and then realise you're in the wrong one

1) For an existing branch: `git add -A && git stash`, then `git checkout BRANCH_NAME` and `git stash pop`

OR

2) For a new branch: `git add -A && git stash && git stash branch BRANCH_NAME`