git-sync-all-branches.sh

Git sync all the branches in the repository

0

Votes

# 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
git pull --all

Vote Here

You must earn at least 1 vote on your snippets to be allowed to vote

Terms Of Use

Privacy Policy

Featured snippets are MIT license

Gears & Masters

Advertise

DevOpsnipp.com © 2020

medium.png