Skip to content

Instantly share code, notes, and snippets.

@lottadot
Created February 20, 2013 19:52
Show Gist options
  • Save lottadot/4998800 to your computer and use it in GitHub Desktop.
Save lottadot/4998800 to your computer and use it in GitHub Desktop.
git-up-dirtree
#!/bin/sh
# Copyright (c) 2012-2013 Lottadot LLC
# License is share and share alike damnit.
# Requires gem `git-up`
echo -e "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
set +e
current_dir=$(pwd)
script_dir=$(dirname $0)
find . -type d -name .git -maxdepth 2 -mindepth 1 \
| xargs -n 1 dirname \
| sort \
| while read line; do echo $line && cd $current_dir/$line && git-up; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment