Last active
August 29, 2015 14:23
-
-
Save mgurov/c333970b1f8ecd925b0e to your computer and use it in GitHub Desktop.
massive git remote migration
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
| for GIT_DIR in $(find . -name ".git"); do git --git-dir=$GIT_DIR remote -v | cut -d ' ' -f 1 | uniq | grep old_repo | sed 's/old_repo/new_repo/' | xargs -n 2 git --git-dir=$GIT_DIR remote set-url; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
preview:
for GIT_DIR in $(find . -name ".git"); do git --git-dir=$GIT_DIR remote -v | cut -d ' ' -f 1 | uniq | grep old_repo | sed 's/old_repo/new_repo/'; done