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 part 1 of my journey into learning Git, using GitHub and contributing to an open source project.
- Part 1 – Install Git
- Part 2 – Set up GitHub
- Part 3 – Fork project
- Part 4 – Contribute code
- Part 5 – Submit pull request
What is Git ?
Git is a free and open source, distributed version control system initially designed and developed by Linus Torvalds of Linux fame. Even though there are fundamental differences from a revision control system such as Subversion, there are numerous books and documentation available to help you.
The major difference with Subversion is that every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, not dependent on network access or a central server. This takes some time to get used to but once the light comes on it is pretty cool.
If you want to use GitHub you’ll need an SSH key. Even though Git comes with an SSH client, I highly recommended that you install PuTTY on Windows. This is a free Telnet/SSH client that has a number of utilities that make dealing with SSH keys and passphrases more pleasant.
I downloaded and installed the PuTTY 0.60 Windows Installer.
Make sure that you associate .PPK (PuTTY Private Key) files with Pageant (SSH authentication agent) and PuTTYgen (SSH key generation utility).
I was only interested in using the Git Bash shell via the Windows Explorer context menu and so selected the Git Bash Here option. Since I was installing TortoiseGit for GUI based Git interactions I did not want my context menu cluttered with the Git GUI Here option.
I selected the Use Git Bash only option here since I wanted my Git environment to work smoothly and remain contained. I was also only ever going to use command line Git from the Git Bash shell.
Since I have PuTTY and TortoiseSVN already installed the Git installer has picked up the various Plink.exe executables. Plink is a command line interface to the PuTTY libraries that tools such as Git or TortoiseSVN/TortoiseGit use to provide SSH capabilities.
I selected the Use (Tortoise)Plink option and made sure that the file path pointed to the Plink executable in my PuTTY install folder. Now Git will use PuTTY to manage its SSH requirements.
Git can translate line endings between Windows and Unix style line endings. I selected the Checkout as-is, commit as-is option as this would not perform any conversions. I figured that if I was working on a Windows project it should have Windows line endings.
Confirm that Git for Windows has been successfully installed by firing up the Git Bash shell. I fired mine up in my projects folder.
TortoiseGit provides an extension to Windows Explorer that works with a Git repository. Some people feel more comfortable using graphical tools. I prefer to have both since I can use whichever one helps me get a specific task done faster or easier.
I downloaded and installed the Tortoise Git 18.104.22.168 Windows installer.
Like Git, TortoiseGit also can be made to use the PuTTY Plink executable.
I selected all the features and completed the installation. That was easy !
Git enabled !
I now had Git installed and was equipped with both the command line Git Bash shell and GUI based TortoiseGit options.
Next is setting up GitHub …