Skip to content

Instantly share code, notes, and snippets.

@alexbonhomme
Created July 20, 2017 10:26
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexbonhomme/5cb5c560ebd841f7f53aff42ea1f03a8 to your computer and use it in GitHub Desktop.
Save alexbonhomme/5cb5c560ebd841f7f53aff42ea1f03a8 to your computer and use it in GitHub Desktop.
Update Github username in local repos
# Update and convert old HTTPS sources
find . -path "*/.git/config" -exec sed -i '' -e "s,url = https://github.com/blckshrk,url = git@github.com:alexbonhomme,g" {} \;
# Update SSH sources
find . -path "*/.git/config" -exec sed -i '' -e "s,url = git@github.com:blckshrk,url = git@github.com:alexbonhomme,g" {} \;
# checks
find . -path "*/.git/config" -print0 | xargs -0 grep 'alexbonhomme'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment