Link a local repository to a different remote repository
1- Delete all connection with the remote repository:Inside the project folder:
git rm .git(Remove all data from local repository)git status(I must say that it is not linked to any, something like an error)
2- Link to a new remote repository
git initTo start a local repositorygit remote add origin urlrepository.gitTo link with remote repositorygit remote -vTo confirm that it is linked to the remote repository
3- Add changes to the local repository and push to the remote repository
git pullorgit pull origin master --allow-unrelated-historiesif git history is different in both local and remote repo.git add.git commit -m" Message "git push -u origin master
that's it!