A typical workflow with Git branching
A distributed version control system such as Git is designed for the complex and nonlinear workflows that are 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).
How to do it...
- We go to the
myprojectrepository and we create a new branch named
$ pwd /home/cyrille/git/cookbook-2nd/chapter02 $ cd myproject $ git branch newidea $ git branch * master newidea
As indicated by the star
*, we are still on the master branch.
- We switch to the newly-created