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?
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.