For a project I’m using the TFS Git integration. After creating a local branch and committing some changes, I couldn’t sync my changes to the remote TFS repo. The ‘Sync’ button was disabled on the Unsynced Commits screen.
The reason the ‘Sync’ button was disabled is that although I had the branch created locally, this branch didn’t exist yet on the remote TFS repo. I had to create this branch first. This is not possible from inside Visual Studio (yet).
So you have to go to a command prompt and execute the following command to push the current branch and set the remote as upstream:
git push --set-upstream origin new_branch