Split the code into two branches: “master” (stable) and “development (unstable). New code additions should go in the development branch until they have been tested, then they can be merged into the master branch.

To switch branches using SourceTree:

In the left sidebar: under REMOTES / origin, double click on “development” (gray icon). You then will be able to add the development branch as a local branch that you can work on. This sets up the two branches so you can switch back and forth between them.

To switch between branches, double click on the appropriate branch under BRANCHES in the sidebar (blue icons)

Important: when pushing changes, be sure to make sure you are pushing to the branch you want