0

I moved a git repo from https://github.com/username/testrepo.git to https://github.com/companyname/testrepo.git and now need to do some more work on the gem. When I go into the directory on my local machine and type git remote -v it still says origin https://github.com/username/testrepo.git.

My question is, what is the proper way for me to update this remote with the new location and begin working again?

michaeltwofish
  • 4,096
  • 3
  • 28
  • 32
BC00
  • 1,589
  • 3
  • 29
  • 47
  • I removed the `[ruby]` and `[rails]` tags since this has absolutely nothing whatsoever to do with Ruby or Rails. It also doesn't have anything to do with GitHub, but I left that tag in for now. – Jörg W Mittag May 13 '13 at 19:08

1 Answers1

2

First remove the origin remote:

git remote rm origin

Then rename it like this:

git remote set-url origin git@github.com:companyname/testrepo.git

Source: how to rename a repository on github?

Community
  • 1
  • 1
amb110395
  • 1,545
  • 13
  • 16