Skip to content

Instantly share code, notes, and snippets.

@tylercasson
Last active September 24, 2017 04:43
Show Gist options
  • Save tylercasson/58612403c8a11a6fc333e6f0b1e24e6e to your computer and use it in GitHub Desktop.
Save tylercasson/58612403c8a11a6fc333e6f0b1e24e6e to your computer and use it in GitHub Desktop.
Run `git pull` on git repos in current directory
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