Skip to content

Instantly share code, notes, and snippets.

@azet
Last active December 10, 2015 13:39
Show Gist options
  • Save azet/4442445 to your computer and use it in GitHub Desktop.
Save azet/4442445 to your computer and use it in GitHub Desktop.
pull all project subdirectories in e.g. ~/github/
for dir in `find . -maxdepth 1 -type d | tail -n +2`; do cd $dir ; echo "pulling $dir" ; git pull || ( echo "failed in '$dir' - cd to original dir." && cd - 1>/dev/null ; exit 1 ) ; cd - 1>/dev/null ; done
@azet
Copy link
Author

azet commented Jan 3, 2013

clone various projects in one dir (e.g. ~/git/ or ~/github/ or even ~/internal_company_projects/). execute the script/line and you'll update all the cloned subdirectories automatically (depth = 1), no submodule checkout though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment