Skip to content

Instantly share code, notes, and snippets.

@TaekyungHeo
Created September 14, 2018 23:37
Show Gist options
  • Select an option

  • Save TaekyungHeo/eaf6489c6392906de645ae911375bd76 to your computer and use it in GitHub Desktop.

Select an option

Save TaekyungHeo/eaf6489c6392906de645ae911375bd76 to your computer and use it in GitHub Desktop.

Revisions

  1. Taekyung Heo created this gist Sep 14, 2018.
    4 changes: 4 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    # https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
    git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
    git fetch --all
    git pull --all