Skip to content

Instantly share code, notes, and snippets.

@Ketouem
Created January 27, 2016 09:28
Show Gist options
  • Save Ketouem/74a0e3e5e4366e8ef42d to your computer and use it in GitHub Desktop.
Save Ketouem/74a0e3e5e4366e8ef42d to your computer and use it in GitHub Desktop.
Goes through all the folder and apply a `git pull --rebase` from master
for file in */ ; do
if [[ -d "$file" && ! -L "$file" ]]; then
echo "$file is a directory, launching git commands.";
cd $file && git checkout master && git reset HEAD --hard && git pull --rebase --prune;
cd ..;
fi;
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment