Skip to content

Instantly share code, notes, and snippets.

@rashid327
Last active August 28, 2020 09:09

Revisions

  1. rashid327 created this gist Aug 28, 2020.
    18 changes: 18 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    Usage:

    # Checkout an existing branch
    $ git checkout <branch_name>

    # Checkout and create a new branch with that name
    $ git checkout -b <new_branch>


    In Practice:

    # Switching to branch 'new_feature'
    $ git checkout new_feature
    Switched to branch 'new_feature'

    # Creating and switching to branch 'staging'
    $ git checkout -b staging
    Switched to a new branch 'staging'