Skip to content

Instantly share code, notes, and snippets.

View ShaggyTech's full-sized avatar

Brandon Eichler ShaggyTech

  • Texas, USA
View GitHub Profile
@ShaggyTech
ShaggyTech / git-checkout-all-branches.sh
Created April 2, 2020 16:08 — forked from ElfSundae/git-checkout-all-branches.sh
Git checkout all remote branches
#!/bin/bash
remote=origin ; for brname in `git branch -r | grep $remote | grep -v master | grep -v HEAD | awk '{gsub(/^[^\/]+\//,"",$1); print $1}'`; do git branch --track $brname $remote/$brname || true; done 2>/dev/null