I am trying to figure out how to commit a repo made in vs code to a specific repo made in vs code.
I have tried making and importing 5 different git repos and tried to add them as remote addresses to my vs code git source control menu, however, despite every attempt, the only repo that vs code will allow me to make commits on is the repo i used for another project.
When I view the output in my terminal, I can see the address for the repo that vs code wants to commit to, is the wrong one.
When I try to add a new remote in vs code, source control, I can copy and paste the repo url in the remote bar, press enter, and one of two things happens (randomly). Either, the repo gets added, with no branch and no option to create a branch in the vs code remote list. When I then try to commit the code, the commit is made on the wrong repo (despite the remote for the repo to which I want to commit being selected). Alternatively, I add the repo url in the remote address bar, press enter and nothing happens. It just wont add to the remote menu at all.
When I try to use the terminal to push to a new origin - using the address of the new repo, as follows:
git remote add origin https://github.com/MyRepos/newrepo.git
git branch -M maincf
git push -u origin maincf
I get a success message that says that it made a new branch called maincf in the oldrepo.git.
VS code must be overriding my request to commit to the new repo, but I can't find where to give it the instruction to use the new repo.