How do I create a new branch in git?

Open up your terminal and navigate to your website directory.

git branch newbranchname {PRESS ENTER}
git checkout newbranchname {PRESS ENTER}

Switched to branch 'newbranchname'

Shortcut: checkout -b newbranchname

Back to Blog

Say Hello

You can reach me by email, I'd love to hear from you.