Skip to content

Instantly share code, notes, and snippets.

@m3dwards
Created January 3, 2017 11:27
Show Gist options
  • Save m3dwards/347ac1c3c59ea9194a2bf8ce4d419a90 to your computer and use it in GitHub Desktop.
Save m3dwards/347ac1c3c59ea9194a2bf8ce4d419a90 to your computer and use it in GitHub Desktop.
Git checkout master and pull on all immediate directories within current directory.
#! /bin/sh
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c '(echo {} && cd {} && git checkout master && echo && git pull && echo)' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment