Gerrit 简明教程
Gerrit - Create a Branch
你可以使用以下命令在本地计算机上创建分支。
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.

在这里,我们使用 branch123 作为新的本地分支。你可以使用以下命令在“master”中显示新分支。
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.

Git checkout 在本地分支之间导航,更新工作目录中的文件,并通知 Git 在该本地分支上记录提交。
Git checkout navigates between the branch, updates the files in the working directory, and informs Git to record the commits on that branch.