Ejemplo "git checkout-b"

Ejemplos de código

6
0

git checkout-b

# git checkout regarding branches switch

git checkout <branch_name>
# will take you to that branch

git checkout -b <new_branch> 
# will create a new branch based on the branch you are already in
# if this branch already exists then you will get the following msg:
# 'A branch named <new_branch> already exists.'

git checkout -B <new_branch>
# will create a new branch.
# WATCH OUT though! if this branch already exists it will reset it!

git checkout origin/<branch_name> -b <branch_name_2>
# will create a new branch based on the remote one
6
0

rama de git checkout

truelover@PEACE project % git checkout master
truelover@PEACE project % git checkout branch_name
#create branch
truelover@PEACE project % git checkout -b new_branch_name
6
0

git checkout

git checkout -b origin/branch-name
git checkout -b branch-name
2
0

ejemplo "git checkout-b"

$ git checkout -b new-branch --track origin/develop

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................