I have an open source repository in hosted in GitHub. I have connected that to the Visual Studio Team Services.
I want to work only through the Team Services (so, connect to my Team Services account and project in Visual Studio, not to GitHub). The GitHub repo should always reflect the latest version of the code pushed to VSTS.
The problem is it only works partially.
I managed to connect my GitHub repo to VSTS and Import the code.
I can see the initial commits made to the repo in GitHub.
I can see the build status for each of the commits in GitHub (green, red, orange).
I can trigger a build when I commit to code in GitHub.
I can connect, commit and trigger a build via Visual Studio.
However
I cannot see in VSTS the code and commits which were done in GitHub
I cannot see in GitHub the code and commits which were done in VSTS
So, it seems these are connected but out of sync.
I looked into this post here. It's 2 years old, so perhaps things have changed, because it does not work for me: How to synchronize VSTS and Github respositories when commits are made and also this Visual Studio Team Services - Sync w/ Github Repository
The thing I don't get is that when a build is triggered, it pulls the latest sources, and I can see my last commit description, but the file is not updated in VSTS.
Regardless, I then do the steps described in the anwser, but it keeps saying 'Already up-to-date'. This sync build succeeds but nothing changes - neither in VSTS nor in GitHub.
What do I need to do to have them both in sync?