How To Switch Local Branches

Introduction

This page explains how to switch between branches in your local repository, so you can maintain multiple sets of modified code without needing multiple working copies of the codebase.

Using TortiseGit(Windows only)

If you've made changes you'd like to keep, you'll want to commit them first. When you're ready, click RMB to bring up the shell menu and expand the "TortiseGit ->" option and find the 'Switch/Checkout Branch" option.

Switch_Branch.png

Click it and it will bring up a new window.

Switch_Branch2.png

You can either select an existing branch from the drop-down at the top like so:

Switch_Branch3.png

Or click the 'Create Branch' option and put in a new branch name. Once you've done this, press OK. It will switch to the new branch(creating it, if needbe) and you're ready to start doing work on the newly selected branch!

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License