Working with git branch

Working with git branch

Instructor-svgAl-Mamun Sarkar
Apr 12 , 2020

Working with git branch. The following commands shows how to create branch, switch branch, delete branches.

 

Show list of branches:

git branch

 

Create new branch:

git branch [branch-name]

Example:

git branch develop

 

Switch to branch:

git checkout [branch-name]

Example:

git checkout develop

 

Marge branches:

git merge [branch-name]

Example:

git merge develop

 

Delete a branch:

git branch -d [branch-name]

Example:

git branch -d develop

 

  • Share On:
  • fb
  • twitter
  • pinterest
  • instagram