Skip to content

Instantly share code, notes, and snippets.

@filipekiss
Forked from tamtamchik/fetcher.sh
Created July 19, 2012 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save filipekiss/3146491 to your computer and use it in GitHub Desktop.
Save filipekiss/3146491 to your computer and use it in GitHub Desktop.
Fetch all branches & tags from remote git repository.
#!/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
@tamtamchik
Copy link

Nicely done! Thanks! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment