Skip to content

Instantly share code, notes, and snippets.

@exophunk
Last active October 26, 2017 13:05
Show Gist options
  • Select an option

  • Save exophunk/deda68d4419061b1c39537c865795c3f to your computer and use it in GitHub Desktop.

Select an option

Save exophunk/deda68d4419061b1c39537c865795c3f to your computer and use it in GitHub Desktop.
Loops trough all project folders and runs git tasks like checkout or pull
# Checkout dev branch on all projects in current folder
for dir in */; do cd $dir && git checkout develop; cd .. ; done
# Pull on all projects in current folder
for dir in */; do cd $dir && git pull; cd .. ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment