Home > OS >  Upload project to different repository
Upload project to different repository

Time:04-18

I had a reactjs project which I had already uploaded to a GitHub repository, with git init, git add ., git commit and push.

I deleted this repository and created another one where now I want to make the commits in this new one.

How can I do this?

CodePudding user response:

If you have deleted the remote one, on GitHub, and created a new empty one (still on GitHub), you can redirect your existing local commits with:

cd /path/to/existing/local/repository
git remote set-url origin https://github.com/MyAccount/MyNewRepo
git push
  • Related