How do I fix the fact that I'm working on the wrong branch

Viewed 1799

Ok so I meant to be working on a branch called directory-layout, but it turns out that I am working on a branch called master. This is a problem.

I have not yet performed git add . nor git commit -m "I've made a horrendus mistake I'm sorry"

What do I do to add my changes to another (or new) branch and why?

2 Answers
Related