Skip to content

Instantly share code, notes, and snippets.

@bionix
Created July 22, 2016 08:18
Show Gist options
  • Save bionix/76fdea108aa6e8b3926ede1d9f6fc469 to your computer and use it in GitHub Desktop.
Save bionix/76fdea108aa6e8b3926ede1d9f6fc469 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Set color output
red=`tput setaf 1`
green=`tput setaf 2`
reset=`tput sgr0`
for i in `ls -1` ; do echo "${green}-- Update git folder${reset} ${red}$i ${reset}${green}--${reset}" ; cd $i ; git checkout master ; git pull ; git checkout develop ; git pull ; git checkout master ; git repack -ad ; cd .. ; done
# EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment