can't sync the current branch does not track a remote branch

Viewed 2561

I wanted to story my project on a git repository in case anything goes wrong on the old computer I'm working on. being the smart person I am I copied the wrong url when I went to publish and now I cant sync with visual studio. (currently using 2019)

I went and changed it to the correct url in the repository settings but it still says the above error and the sync/pull/push is grey/ unclickable.

I did quite a bit of googling but found nothing helpful. one thing I found was this:

Visual studio/GIT : No tracked remote branch

which talks about how to avoid getting here, but I just want to be able to sync with git now that I am here.

I've tried copying the project to a new folder and then deleting the .config .ignore and .attribue files as well and that didn't work.

here is what my team explorer currently looks like

team explorer

how do I make it so I can sync this project with git?

1 Answers

The fix for me was installing a git bash prompt then navigating to project root directory. then typing:

git push --set-upstream origin master

you can install git from here https://git-scm.com/download/win

Related