Skip to content

Instantly share code, notes, and snippets.

@ay65535
Forked from mnogu/git.sh
Last active January 2, 2016 19:19
Show Gist options
  • Select an option

  • Save ay65535/8349718 to your computer and use it in GitHub Desktop.

Select an option

Save ay65535/8349718 to your computer and use it in GitHub Desktop.

Revisions

  1. ay65535 revised this gist Jan 10, 2014. 2 changed files with 1 addition and 5 deletions.
    5 changes: 0 additions & 5 deletions git.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +0,0 @@
    for i in `git branch -r|grep -v HEAD|grep -v master|sed 's:origin/::g'`
    do
    git checkout --track -b $i origin/$i
    done
    git checkout master
    1 change: 1 addition & 0 deletions git_downloadAllbranches.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    for i in `git branch -r | grep -Ev "HEAD|master" | sed 's:origin/::g'`; do; git checkout --track -b $i origin/$i; done; git checkout master
  2. @mnogu mnogu created this gist Oct 6, 2012.
    5 changes: 5 additions & 0 deletions git.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    for i in `git branch -r|grep -v HEAD|grep -v master|sed 's:origin/::g'`
    do
    git checkout --track -b $i origin/$i
    done
    git checkout master