Skip to content

Instantly share code, notes, and snippets.

View L-Andy's full-sized avatar

L Andy L-Andy

View GitHub Profile
@L-Andy
L-Andy / git-sync-all-branches.sh
Created December 18, 2020 09:46 — forked from piaoger/git-sync-all-branches.sh
git-sync-all-branches
# fetch all branches
# From: http://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches
#!/bin/bash
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master`; do
git branch --track ${branch##*/} $branch
done
git fetch --all