Version Control
Git: Moving ahead
Git: Moving ahead
  • Group 1
    • Resolving Merge Conflict
      • Create master
      • Create a branch
      • Merge them
  • Group 2
    • Branching Demo
      • Create issue53 branch
      • Commit a change
      • Check out master
      • Create a hotfix
      • Merge Hotfix
      • Delete the hotfix
      • Switch back to issue 53
  • Group 3
    • Adding Collaborators
      • Send invite
      • Accept Invite
Powered by GitBook
On this page
  • Checkout a new branch
  • A simple commit history
  1. Group 2
  2. Branching Demo

Create issue53 branch

PreviousBranching DemoNextCommit a change

Last updated 2 years ago

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