- The first step in working with branches is to create one. The fossil branch new command creates a new branch. It can either create a branch based on your current checkout of the project, or you can create a branch at an earlier state of the project.
- The fossil branch new command will create a new branch from a given checkin:
$ fossil branch new NewBranchName Basis-Id
New branch: 9ae25e77317e509e420a51ffbc43c2b1ae4034da
- The Basis-Id is an identifier to tell fossil what code snapshot to branch from. There are several ways to define the Basis-Id. The most common of these are discussed in the next section.
- Note that you need to perform a checkout to update your working folder to the new branch:
$ fossil checkout NewBranchName