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
Advertisement

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

Add yours

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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

Blog at WordPress.com.

Up ↑

%d bloggers like this: