Home > Blockchain >  Do you need to re-clone your repo if you transfer a github repo to a new owner?
Do you need to re-clone your repo if you transfer a github repo to a new owner?

Time:11-26

For Github , I transferred my repo to another owner (and was given admin rights to it). Before that I had already cloned it to my desktop using Github Desktop. Now after the transfer, do I need to delete my local files and re-clone it from the new owner? Or can I just use the local files as is and push changes and it would just send it to the new repo location?

CodePudding user response:

You could use your current repository and just have to update the 'origin' remote url with the command :

git remote set-url origin https://your-new-repo-url

CodePudding user response:

I think you can change the local git remote path (if it doesn't automatically change)

Checking Remote Path on Local:

git remote -v

you will see the output, normally origin one.

If the link isn't right

git remote rm ${remote_name}
git remote rm origin

and to add a new one

git remote add ${remote_name} ${link}
git remote add origin https://github.com/mynew/repo
  • Related