How to upload your open-source projects to GitHub with Visual Studio

If you are following my Cloudifying my app series of articles, you are aware I am converting my app from a Windows-centric app to one that is cloud-centric. Part of my original Windows application handles licensing for my software. Recently, I decided to post my licensing code up to GitHub. In this article and the accompanying video, I teach you the basics for uploading your solution to GitHub using Visual Studio.

[tg_youtube video_id=”1LcOe0LnYcc”]

By the way, if you want to know some of the Git basics, check out my Gotta Git Git article.

Open source or private?

Before you post anything up to GitHub, you should be aware there are two levels of access. The first level is free. With the free level, you can create open-source projects and post pretty much anything and everything you like. Of course, by posting your code using the free level, anyone can access your code.

The next level for your account is a paid account. With a paid account, you can create Git repositories that are private. These private accounts allow you to upload code that others cannot see. You can share your project with other people, but presumably, these are team members that you trust and authorize to view or edit.

In my case, I have a fairly large application that helps professional authors and publishers create eBooks. Most products that create eBooks on the market are freemium or open source, but I can sell my product because it offers compelling features other products do not have. Since I sell commercial software, I am not going to offer my product as an open-source solution, but when I do something that is not unique to my product, I want to offer up my work to the community.

Why open source?

In my case, I purchased a product call the WooCommerce Software Add-on. The add-on allows people to purchase licenses for my software. Unfortunately, the add-on only has documentation for the PHP programming language and therefore was not too useful for me and my C# application. I spent the better part of a month working with the software developer to get needed information and learning how to properly work with the product.

After figuring out how to make my C# application talk to the add-on, I shared it with a bunch of people at a local Meetup here in San Francisco. At the Meetup, some people asked if I could share the code. Certainly, there are elements of my code that are secret (like how I tie the serial number to the user’s computer), but I saw no reason to hide the base code from others as it could be very helpful, and there was no intellectual property I thought was worth protecting.

Visual Studio and GitHub

If you use Visual Studio, you can create a local Git repository for your project. This allows you to manage your code locally. If you want to share your code on GitHub, Microsoft and GitHub teamed up to provide an add-in. With Visual Studio 2017, you get GitHub integration built-in. If I am not mistaken (and I could be wrong), you have to download the free GitHub integration from Microsoft’s website.

You can choose to do all your GitHub work using the CLI (command line interface), or you can make use of the visual user interface. In the video that accompanies this article, I show you how to use the visual tools.

Process steps

Before you go and upload your code to GitHub, there are some steps to take:

  1. Create the Visual Studio project.
  2. Add the Visual Studio project to a Git repository (watch my video to familiarize yourself).
  3. Test your code and make sure it works. Of course, you don’t have to do this — you can just label the code as alpha — but I waited until the code was in good shape first.
  4. Synchronize your code with GitHub.
  5. Update the file. (Technically, this can happen anytime.)
  6. Update the solution with the file.

After you update your project, you can continue to maintain it on your own computer and then submit changes as you see fit. You may also find that people share an interest in your project and submit changes. Another thing that could happen is people may log an issue because the code does not work or they have a recommendation.

Those collaborative elements make GitHub very popular, but you also need to decide what kind of effort you want to put into the project. The best thing to do is state your intentions in the file. For example, if you are just sharing the code but have no interest in making modifications, that is okay, but you should state to set the right expectations for people using your code. Conversely, if you do want people to submit changes or log issues, you should also state that in your file.

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top