'How to change the VS2019 project hooked up to an existing GithHub repos

I'm making an app in C# but, something happened with the dependencies and I want to make a new project and push that project to an existing repo. I've tried fixing the dependencies on the existing, broken project and it doesn't work.

How to reproduce:

You have a project, connected to a GitHub repo and you want to change the project hooked up to the repo.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source