Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save tekin/129195 to your computer and use it in GitHub Desktop.

Select an option

Save tekin/129195 to your computer and use it in GitHub Desktop.

Revisions

  1. tekin revised this gist Jun 13, 2009. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion Checkout alternative branch on Github
    Original file line number Diff line number Diff line change
    @@ -7,4 +7,10 @@ git checkout other_branch

    # Or, in one swift command:

    git checkout -t origin/other_branch
    git checkout -t origin/other_branch

    # which is equivalent to:

    git checkout --track -b other_branch origin/other_branch

    # OK, I'm going to frolic in the sun, no more computer today!
  2. tekin revised this gist Jun 13, 2009. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions Checkout alternative branch on Github
    Original file line number Diff line number Diff line change
    @@ -4,3 +4,7 @@ git branch
    * master
    other_branch
    git checkout other_branch

    # Or, in one swift command:

    git checkout -t origin/other_branch
  3. mtkd revised this gist Jun 12, 2009. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions Checkout alternative branch on Github
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    git fetch origin storemanagement:storemanagement
    * [new branch] storemanagement -> storemanagement
    git fetch origin other_branch:other_branch
    * [new branch] other_branch -> other_branch
    git branch
    * master
    storemanagement
    git checkout storemanagement
    other_branch
    git checkout other_branch
  4. mtkd created this gist Jun 12, 2009.
    6 changes: 6 additions & 0 deletions Checkout alternative branch on Github
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    git fetch origin storemanagement:storemanagement
    * [new branch] storemanagement -> storemanagement
    git branch
    * master
    storemanagement
    git checkout storemanagement