Problem: You have an existing project that you want to add to Visual Studio online, to a new remote git repository.
- Add the project to the local git repository.
- Go to Visual Studio Online and create a remote repository for Git.
- Go to Command Prompt and type the following:
- git remote add origin https://yoursitename.visualstudio.com/_git/newrepositorynamesomething
- git push –set-upstream origin master
- The project is uploaded to the remote repository.
- You can now go to Visual Studio and normally edit your project with the source code being successfully bound to the remote repository.