I just configured Visual Studio 2015 with a connection to GitHub. Unfortunately, it doesn\'t work to track the remote branch. I have 2 projects in the same solution, each ha
The UI doesn't make it very clear that you have to use Publish without adding a remote repo.
If you add a remote first, Publish never becomes available and you get stuck in the "does not track a remote branch" state. I've just had the same trouble in VS2017.
Wrong way:
You might think that before you can sync to a remote, you have to tell Visual Studio about the remote. Don't do that.
Instead, hit Sync:
Visual Studio detects that there is no remote configured for the repo, and takes you to the Push dialog:
Press the relevant Publish button, and an input box appears. This is the right place to configure Visual Studio with the URL of the remote repo.
When the remote is added this way, Visual Studio recognizes the status of the remote repo so that it no longer thinks it's untracked. From now on, it enables all the sync/push functionality as expected.
run this through command prompt in your local repo folder:
git branch --set-upstream-to=origin/master master
That will then enable you to "push" through team explorer in VS