Getting ready

It is actually easy to create an orphan branch. The flag --orphan to checkout will do it. It can be executed as follows:

$ git clone https://github.com/PacktPublishing/Git-Version-Control-Cookbook-Second-Edition.git$ cd Git-Version-Control-Cookbook-Second-Edition$ git checkout --orphan fresh-startSwitched to a new branch 'fresh-start'

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.