English 中文(简体)
Gerrit - Create Branch
  • 时间:2024-09-17

Gerrit - Create a Branch


Previous Page Next Page  

You can create a branch on the local machine using the following command.

$ git checkout -b name_of_branch origin/master

The above command creates a new branch as shown in the following screenshot.

Gerrit Creating New Branch

Here, we have used branch123 as the new local branch. You can show the new branch from the master using the following command.

$ git branch

The above command produces the result as shown in the following screenshot.

Gerrit Creating New Branch1

Git checkout navigates between the branch, updates the files in the working directory, and informs Git to record the commits on that branch.

Advertisements