Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #INSTRUCTIONS:
  4. # 1. Checkout out project
  5. # 2. vim checkout-all-branches.sh
  6. # 3. chmod +x checkout-all-branches.sh
  7. # 4. ./checkout-all-branches
  8. # 5. Stay cool, watch the brnaches be tracked
  9. # 6. rm checkout-all-branches.sh
  10.  
  11. #Whenever you clone a repo, you do not clone all of its branches by default.
  12. #If you wish to do so, use the following script:
  13.  
  14. for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
  15. git branch --track ${branch#remotes/origin/} $branch
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement