Last Updated: May 17, 2022
·
13.03K
· tamtamchik

Fetch all branches & tags from remote git repository

Sometimes we need to have a FULL copy of remote git repository and this small script can really help.

#!/bin/bash
for branch in `git branch -r | grep -v HEAD | grep -v master`; do
    echo ${branch##*/} $branch
done
git fetch --all
git pull -v

Thanks http://coderwall.com/filipekiss for the updates!
You can always find latest version on: https://gist.github.com/2869690