Skip to content

Instantly share code, notes, and snippets.

@MnHung
Created May 16, 2019 04:49
Show Gist options
  • Save MnHung/1801679d47545f9a28dd77f92c39ce12 to your computer and use it in GitHub Desktop.
Save MnHung/1801679d47545f9a28dd77f92c39ce12 to your computer and use it in GitHub Desktop.
Pull all git directories
# for all directories in current path, do 'git pull'
find . -type d -mindepth 1 -maxdepth 1 -exec git --git-dir={}/.git --work-tree=$PWD/{} pull origin master \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment