A distributed version control system such as Git is designed for complex and nonlinear workflows typical in interactive computing and exploratory research. A central concept is branching, which we will discuss in this recipe.
You need to work in a local Git repository for this recipe (see the previous recipe, Learning the basics of the distributed version control system Git).
$ git branch newidea
$ git checkout newidea
$ touch newfile.py
$ git add newfile.py $ git commit -m "Testing new idea."