Last active
September 24, 2017 04:43
-
-
Save tylercasson/58612403c8a11a6fc333e6f0b1e24e6e to your computer and use it in GitHub Desktop.
Run `git pull` on git repos in current directory
This file contains 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
ls | xargs -n1 -I % sh -c 'if [ -d %/.git ]; then echo ""; echo -e "[+] \e[32mUpdating %...\e[39m"; git -C % pull 2>&1 | sed "s/^/ \x1b(0\x78\x1b(B /" | sed "$ s/\x1b(0\x78\x1b(B/\x1b(0\x6d\x1b(B/"; fi' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment