Bonobo Git Server – Host Your Own Repository

Have you ever made several rounds of code changes trying to solve a problem and found yourself struggling to figure out what exactly what changed? If you answered, “yes,” you just proved the value of using a software repository. Probably the most well-known cloud based repository, at least in my region of the world, is GitHub. However, what if you want the revision tracking of GitHub within a locally secured environment within your organization’s network? Fortunately, many options exist for locally hosted Git servers to meet those needs.

While features of a Git server vary, I came across an open source version that seems to meet my immediate needs at the very affordable price of FREE. Bonobo Git Server is an open-source software using an MIT License, meaning in short that you have virtually unrestricted permission to use the software however it suits your needs, provided acknowledgement that the software is provided “as is” without warranty, etc. Bonobo Git Server runs on IIS in a Windows environment, so I tested it out this morning directly on my own PC. Provided you can access the site from a remote location on your network, this repository can be used on a remote server. However, for the very security reasons that may be preventing you from wanting to use GitHub for your proprietary software, this web server should not be exposed to the public.

To get started, first download the software from the Bonobo Git Server website. As of the time of this writing, the following appears on the main page of the website, so just click the green button.

The file download is a simple .zip file. Follow the installation instructions on the Install link shown at the top center of the above picture. The process involves installing IIS if not already installed, copying the contents of the .zip file to the wwwroot folder of your website, and making a few simple configuration tweaks. There are options to support multiple forms of authentication. For my purposes just getting started, I just left the default authentication in place, but when I setup on our business server, I plan to change the authentication method. Remember to change your admin password in accordance with your common password policies to secure your environment.

Once you have setup the site and successfully launched it with the instructions from the Bonobo Git Server website, you can create a repository and then push your Visual Studio project to the existing repository or create a new repository from Visual Studio.

From your new website, select Repositories at the top if you do not see the screen below. Then click Create new repository.

Give your repository a name and enter any other details you may wish to place on your repository.

Once created, click the name of the repository.

Click the Copy button for the URL to your repository. You will need this in Visual Studio.

Back in Visual Studio, from your project, go to the Git menu and select Create Git Repository.

Select Existing remote and enter the remote URL you just copied.

If you are using the repo for your Customization Project, remember that the solution contains the website as well which is not within your customization project folder. In this case, you may get the warning below. Just click Yes.

Make your changes and then commit changes to the repository with comments explaining the change. To commit changes, find the Git Changes tab, enter a message explaining the change, and then press the Commit All button.

To push the commit(s) to the repository, press the Push button shown below.

To view the history of changes made, use the Git menu to select View Branch History.

Find the change you wish to view, and double click the line in the list.

Before and After views are shown with color coding of deletions in red and additions in green.

Now your repository can be backed up by the sysadmins, and your history of changes is protected. I’m just getting started, so you’ll need to explore on your own from here. However, this should get you a start in using a repository to keep your hard work protected and perhaps even save you some sanity when things don’t exactly go right.

Happy coding!

Leave a Reply