Skip to content

Instantly share code, notes, and snippets.

@beneggett
Created October 2, 2014 02:14
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 beneggett/a93171c489df122a3419 to your computer and use it in GitHub Desktop.
Save beneggett/a93171c489df122a3419 to your computer and use it in GitHub Desktop.
GIt sync my projects
DIRECTORY_TO_SYNC=~/Sites/my-repo-path/; for REPO in `ls $DIRECTORY_TO_SYNC`; do (cd "$DIRECTORY_TO_SYNC/$REPO"; pwd; git pull); done; unset DIRECTORY_TO_SYNC;
# zshell alias:
pullrepos() {DIRECTORY_TO_SYNC=~/Sites/my-repo-path/; for REPO in `ls $DIRECTORY_TO_SYNC`; do (cd "$DIRECTORY_TO_SYNC/$REPO"; pwd; git pull); done; unset DIRECTORY_TO_SYNC;}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment