You have Git controlled source code on your local PC and working on it using Visual studio 2017. Now if you want to push this source code to DevOps Git Repo then follow these steps.  This article uses one of the Microsoft provided sample application project source code to explain it.

Steps:

>> Your Source code root folder looks like this

>> You open this solution in Visual Studio (Solution Explorer)

>>Now go to Team Viewer and Click on Changes

>>It will show all the files to commit. Add a comment and click Commit All

>>Click Sync link on he new screen

>>This will open the below screen

>>Under the option “Push to Azure DevOps”, click the button “Publish Git Repo”, select the correct DevOps account and provide a repository name, then click “Publish Repository” button

 

>>The project source code is pushed to Git Repo in DevOps. Login to DevOps web account and verify the same