Created
September 26, 2019 10:45
-
-
Save khahux/b73adaf3dd7ddf8b50d49eb5886ef55c to your computer and use it in GitHub Desktop.
对目录下所有的git项目执行pull.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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