Using GitHub with Visual Studio for the Mac

First lets create a new Repository on GitHub .

For this demo I created a public repository that has a readme, and a Visual Studio Git Ignore file.

Create Repo in GitHub

Now I created a simple .Net Core Console app to check into GitHub. I checked use git for version control.

Create console app

Once I created the app I built it to make sure it runs. Now the first thing to do is create an initial commit to the local git repository. In the version control menu select Review and Commit.

Initial Commit

In Git Hub open the Repository you created. Press the clone or download button and copy the url for the repository.

Remote Source

In Visual Studio Version Control Menu select Manage Branches and Remotes

Version Control

Add a new Remote source with the url from the GitHub website

Set Remote Source

I made a minor code change and Selected Review and Commit changes

Commit

In the dialog I selected Push to remote. First time you connect to GitHub it will ask for you credentials

Remote

Once you push your changes you should see it in GitHub. Make sure before you push your changes you update the solution from GitHub.

Files in GitHub