git branch from branch code example

Example 1: create new branch git

$ git checkout -b [name_of_your_new_branch]

Example 2: how to branch from a branch in git

$ git checkout -b myFeature dev

Example 3: create branch in git

# Create New Branch And Switch To It
$ git checkout -b myBranchName

Example 4: git new branch

$ git checkout -b [your_branch_name]
# Switched to a new branch [your_branch_name]

# This is shorthand for:
$ git branch [your_branch_name]
$ git checkout [your_branch_name]

Example 5: create new branch git from master

git checkout -b new-branch-name

Example 6: createa. branch off of development git

//when on branch 'dev' make branch 'myFeature' off of 'dev'
git checkout -b myFeature dev

Tags:

Misc Example