



Have you though about starting open source C# project but didn’t know how? Let me show you a GitHub kick starter.
Firstly, don’t be scared that it’s a long post – most of that are screenshots for your convenience. Next, about tools – I used Visual Studio 2015 Community Edition (free one).
Create GitHub repository
First you need to go to GitHub.com and sign up or sign in if you have an account already. Next click green ‘New repository’ button on the right side.
Fill in the form – enter ‘Repository name’ and check ‘Initialize this repository with a README’. Then click ‘Create repository’ button.
Install GitHub extension in Visual Studio
Once you have GitHub repository you can configure IDE. Open Visual Studio and navigate to ‘Tools/Extensions and Updates…’
Select ‘Online’ in the left hand panel, type ‘GitHub’ in the search box in the right hand panel. Then select ‘GitHub Extension for Visual Studio’ and press ‘Download’.
Follow the installation (agree to license terms) and restart Visual Studio.
Clone GitHub repository locally from Visual Studio
It’s time to get the repo locally. So open Team Explorer (menu: View / Team Explorer) and click ‘Login’ in ‘GitHub’ section.
Type your credentials and click ‘Login’.
Click ‘Clone’ in Team Explorer.
Select repository, set target path and click ‘Clone’.
Create C# Hello World application
Finally some development work. When repository is cloned click ‘Create new project or solution’ hint in Team Explorer.
Choose ‘Console Application’, give it a name and press ‘OK’.
Type fancy code
using System;
namespace MyFirstGitHubApplication
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
Submit C# Hello World to local (cloned) git repository
Ok, you have your code ready. Now you need to push it to local git repo. So go to Team Explorer / Changes.
Setup your user name and e-mail address by clicking ‘Configure’ hint (first time only).
Fill in all the data, click ‘Update’ and then back button to return to your change.
Enter submission comment and click ‘Commit’.
Your change has been submitted to your local git repository – the one cloned from GitHub few steps above.
Push C# Hello World application to GitHub
The last step is to sync your local repository with GitHub. Click ‘Sync’ hint.
Next click ‘Push’ link next to your change in ‘Outgoing Commits’.
The change is in GitHub now! Congratulations!
You can check that GitHub is updated – my repo is here: https://github.com/csharp-today/GitHubHelloWorld
Summary
GitHub integration with Visual Studio is quite good. I personally see no obstacle to create open source C# code this way.




Thanks – very helpful!