Here is a manual way to do git remote set-url origin [new repo URL]
:
- Clone the repository:
git clone <old remote>
- Create a GitHub repository
Open
<repository>/.git/config
$ git config -e
[core] repositoryformatversion = 0 filemode = false bare = false logallrefupdates = true symlinks = false ignorecase = true[remote "origin"] url = <old remote> fetch = +refs/heads/*:refs/remotes/origin/*[branch "master"] remote = origin merge = refs/heads/master
and change the remote (the url option)
[remote "origin"] url = <new remote> fetch = +refs/heads/*:refs/remotes/origin/*
Push the repository to GitHub:
git push
You can also use both/multiple remotes.