Skip to content

Instantly share code, notes, and snippets.

@danielgamage
Created August 21, 2014 13:44
Show Gist options
  • Save danielgamage/6955fe2979939cd3a753 to your computer and use it in GitHub Desktop.
Save danielgamage/6955fe2979939cd3a753 to your computer and use it in GitHub Desktop.
switch remotes on a repository and push everything to new location
#!/bin/bash
git remote rm origin
git remote add origin $1
git push -u origin --all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment