Skip to content

Instantly share code, notes, and snippets.

@fentie
Created January 28, 2014 19:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fentie/8674985 to your computer and use it in GitHub Desktop.
Save fentie/8674985 to your computer and use it in GitHub Desktop.
Simple bash script to run git pull on first level of child directories
function gupdate() {
for i in */.git;
do ( cd "${i/\/.*/}"; git pull );
done # Pull updates from all git repos below your CWD. single level only
}
#credit for this goes to @climagic, who got it from someone else, but I no longer have the original link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment