Created
June 4, 2012 17:25
-
-
Save tamtamchik/2869690 to your computer and use it in GitHub Desktop.
Fetch all branches & tags from remote git repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for branch in `git branch -r | grep -v HEAD | grep -v master`; do | |
echo ${branch##*/} $branch | |
done | |
echo "Fetching..." | |
git fetch --all | |
echo "Pulling..." | |
git pull -v | |
echo "Results: Branches" | |
git branch -a | |
echo "Results: Tags" | |
git tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey, just made a little improvement so we can discard the
grep remotes
part. https://gist.github.com/3146491 :)