Create issue53 branch

Checkout a new branch

First, let’s say you’re working on your project and have a couple of commits already on the master branch.

A simple commit history

You’ve decided that you’re going to work on issue #53 in whatever issue-tracking system your company uses. To create a new branch and switch to it at the same time, you can run the git checkout command with the -b switch:

git checkout -b iss53
Note that, above commands is shorthand for:

$ git branch iss53
$ git checkout iss53

Figure 19. Creating a new branch for issue #53

Last updated