Last active
September 28, 2018 16:55
-
-
Save dialex/b43991d15057575cfb4973f2266b16ec to your computer and use it in GitHub Desktop.
My purpose is to pull (rebase) all git repositories in the current directory
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 #fail on first error | |
echo -e "🤖 My purpose is to pull (rebase) all your git repositories in this directory.\n" | |
for d in */ ; do | |
echo -e "\n>> Pulling git repo... ${d%?}" | |
cd $d; | |
#git pull -r; | |
git pull -r --autostash; | |
git remote prune origin; | |
cd .. | |
done | |
echo -e "\n🤖 It's done Rick." | |
read |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TODO: based on input/flag use
autostash