Git pull with subdirectories. Instead of every subdirectory one by one.

If you have for example a github directory in our home directory and want to update all the applications at the same time, instead of going in to every subdirectory and git pull from there. You can do every subdirectory at the same time

for i in */.git; do ( echo $i; cd $i/..; git pull; ); done
┌─[roger@parrot]─[~/github]
└──╼ $for i in */.git; do ( echo $i; cd $i/..; git pull; ); done

2 thoughts on “Git pull with subdirectories. Instead of every subdirectory one by one.

Add yours

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Blog at WordPress.com.

Up ↑