I'm hosting a project in Github, but now I purchased a plan with Dreamhost that includes shell access and Git.
Github [Origin] / \ pull/ \pull /push push\ / \ Laptop Dreamhost (cloned) (cloned)
I would like to delete my repo from Github, and starting push directly to DH.
How do I change origin in my Laptop, and should I delete the origin in Dreamhost?
Under your repository name, click Settings. Click Transfer. Read the warnings and enter the repository name to confirm that you've done so. Type the name of the new owner and click I understand, transfer this repo.
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.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With