Skip to content

Instantly share code, notes, and snippets.

@fengye
Last active July 6, 2019 04:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fengye/14254fa61ad345d6a5d204a9323d3e58 to your computer and use it in GitHub Desktop.
Save fengye/14254fa61ad345d6a5d204a9323d3e58 to your computer and use it in GitHub Desktop.
#!/bin/bash
pushd $1
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
git fetch --all
git pull --all
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment