create branche git code example

Example 1: git command to create a branch

//Create a New Branch
git checkout -b [name_of_your_new_branch]
//First Push
git push --set-upstream origin [name_of_your_new_branch]

Example 2: create new branch git

$ git checkout -b [name_of_your_new_branch]

Example 3: create branch in git

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

Example 4: git create branch

$ git checkout -b iss53
Switched to a new branch "iss53"

Example 5: git create branch

$ vim index.html
$ git commit -a -m 'Create new footer [issue 53]'

Example 6: branch creation

git branch -m branch bug
git fetch origin
git branch -u origin/bug bug
git remote set-head origin -a

Tags:

Misc Example