Skip to content

Instantly share code, notes, and snippets.

@rahulkj
Created August 23, 2019 15:04
Show Gist options
  • Save rahulkj/0b2acdc1c7f36fdc09dbb1b915dbac72 to your computer and use it in GitHub Desktop.
Save rahulkj/0b2acdc1c7f36fdc09dbb1b915dbac72 to your computer and use it in GitHub Desktop.
Update git repositories
#!/bin/bash
read -e -p "Enter the git directory:" FOLDER
pushd $FOLDER
while read -r line; do
pushd $line
git pull
popd
done <<< "$(ls -d *)"
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment