Skip to content

Latest commit

 

History

History
46 lines (41 loc) · 708 Bytes

how-to-using-branch.md

File metadata and controls

46 lines (41 loc) · 708 Bytes

How to using branch

Create new branch / checkout to another branch

Checkout and create (if nothing)

git checkout -b "branch-name"

example

git checkout -b "develop"

Checkout to exist branch

git checkout main

Push new branch

git push -u origin {new-branch-name}

Example

git push -u origin create-classroom-schema

Delete branch

git branch -D "branch-for-delete"

Example

git branch -D "encode-decode-data"

Full

  1. create new branch
  2. push new branch
  3. back checkout to develop
git branch
# develop
git checkout -b "new-branch"
git push -u origin new-branch
git checkout develop