Leaving Github, how to change the origin of a Git repo?
The easiest way is:
$ git config remote.origin.url <Dreamhost-git-URL>
You show the remotes after this:
$ git remote -v
origin Dreamhost-git-URL (fetch)
origin Dreamhost-git-URL (push)
The best way is to git remote set-url origin <new-url>
git remote rename origin github
git remote add origin <DreamHost-git-URL>
# test and make sure the DreamHost origin works properly for fetch and push
git remote rm github
I prefer using the 'git remote' command instead of screwing about with the .git/config file by hand.