Skip to content

Instantly share code, notes, and snippets.

@chetmancini
Created February 19, 2016 13:36
Show Gist options
  • Save chetmancini/e695c6db5b6dfb0748f2 to your computer and use it in GitHub Desktop.
Save chetmancini/e695c6db5b6dfb0748f2 to your computer and use it in GitHub Desktop.
A script to git-fetch all the repositories in a single directory.
#!/bin/bash
for dir in */;
do
dir=${dir%*/}
echo "###############################################################################"
echo ${dir##*/}
cd $dir
git fetch --all
git merge --ff-only
cd ..
done%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment