Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Bypass some limitations on getting origin HEAD
  4. # by parsing each branch individually.
  5.  
  6. # Get all origin branchs
  7.  
  8. ORIGINS=$(git ls-remote --heads origin | tr '\/' ' ' | tr -s ' ' | cut -d' ' -f3)
  9.  
  10. for branch in $ORIGINS
  11. do
  12. git fetch origin $branch -p
  13. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement