Skip to content

Instantly share code, notes, and snippets.

@khahux
Created September 26, 2019 10:45
Show Gist options
  • Save khahux/b73adaf3dd7ddf8b50d49eb5886ef55c to your computer and use it in GitHub Desktop.
Save khahux/b73adaf3dd7ddf8b50d49eb5886ef55c to your computer and use it in GitHub Desktop.
对目录下所有的git项目执行pull.
#!/bin/bash
set -e
for i in $(find . -name .git); do
echo "Git pull: ${i:2:$((${#i}-7))}"
(cd $PWD${i:1:$((${#i}-6))} && git pull)
echo
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment