Git, GitHub and an open source .NET project – Part 5

I have used the open source enterprise search platform Solr for a number of years now and on a recent project have been using the open source SolrNet .NET client library. The SolrNet library lacked a feature I required when used with the bundled Service Locator implementation. A number of people had been asking for the same feature so I decided to jump in and implement it.

This is the final part of my journey into learning Git, using GitHub and contributing to an open source project.

GitHub Workflow

As I discussed in an earlier post, the typical workflow of contributors to an open source project hosted on GitHub can be a bit intimidating. It involves the following steps:

  • Fork
  • Clone
  • Write and commit code
  • Push
  • Submit pull request

I have gone through forking a project and cloning the repository. Writing and committing code to your local repository. Pushing those changes up to your cloned repository on GitHub. Now all that is left is to submit a pull request to the master project.

Pull Request

A pull request wraps up a number of commits so that another interested party can review them and decide whether or not to include them in a master project. GitHub makes this incredibly easy.

GitHub - pull request

I navigated to my paulbouwer/SolrNet repository on GitHub and after confirming the commit details via the Commits tab clicked on the Pull Request button.

GitHub - pull request

I wrote a comment around the commits I was submitting in the pull request. GitHub always makes it clear as to what is going on. Note the You’re asking mausch to pull 1 commit into mausch/master from paulbouwer/master.

GitHub - pull request

GitHub allows you to verify the commits included in the pull request via the Commits tab.

GitHub - pull request

GitHub allows you to verify the files and diffs on those files included in the pull request via the Files Changed tab. I had a number of issues with line ending differences on my files vs the master project – so a great tip is to pay attention to these. Mauricio kindly resolved these for me.

GitHub - pull request

GitHub allows you to preview your pull request message via the Preview submenu on the Preview Discussion tab. I finally submitted the pull request by clicking on the Send pull request button.

GitHub - pull request

The pull request has now been added to the pull requests queue of the master project mausch/SolrNet. GitHub again makes it clear as to what is going on. Note the paulbouwer wants someone to pull 1 commit into mausch/master from paulbouwer/master.

GitHub - pull request

Clicking on the Pull Requests tab in the master project mausch/SolrNet shows the current pull request queue and confirms that my pull request is in it.

Acceptance

Commits accepted into master project

I was notified by GitHub via email that my commit had been accepted by into the master project mausch/SolrNet. I confirmed this by clicking on the Commits tab on the master project page.

Issue 83 closed

I also confirmed that the feature I had worked on was now closed in the SolrNet issues list. It felt good – my commit had been accepted into the master SolrNet project.

End of a journey

This has been an incredible journey and I can highly recommend dedicating some time and code to an open source project. The satisfaction of contributing to a project used by a community is something else. You also get a lot back – my knowledge of Git has improved and the insight into how other people code and their thought and design processes has been invaluable.

There’s nothing stopping you – find a project that you believe in and help out !

Advertisements

2 thoughts on “Git, GitHub and an open source .NET project – Part 5

  1. Awesome posts Paul, stumbled across them when looking for WinMerge command line arguments one day, decided to read it properly now, very helpful, I may just do that — “find a project that you believe in and help out !” 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s