Git(Hub) Init

GitHub's Octocat

Git and GitHub are - aside from your Text Editor or IDE - the most essential tools in a coder's arsenal.

Used in conjunction, they become much more than version control and source code management tools - and whether you're a professional or hobbyist, Git and GitHub should be as familiar to you as your IDE. In fact, it's a good bet that at least Git - and perhaps even GitHub - are already integrated with your IDE being among the most popular VCS tools available.

Here's a cheat sheet that I put together for myself - but I figured that you lot might find it useful as well:

A brief history of Git ...

As I do elsewhere on this site, I'm going to assume that you've got a certain level of understanding - but even the seasoned professionals among you might be surprised to learn that Git was first created by Linus Torvalds in 2005 for the development of the Linux Kernel, with other kernel developers contributing to its initial development.

Git is a Distributed Version Control System (DVCS) which takes a peer-to-peer approach to version control, as opposed to the client-server approach of centralised systems - and, unlike most client-server systems, every Git directory on every computer is a fully-fledged repository with complete history and full version tracking capabilities, completely independent of network access or a centralised server. This means that you can use Git entirely within your local environment if you want to, taking full advantage of its abilities without ever needing to connect to another machine.

... and GitHub

GitHub, on the other hand, is a project hosting service launched in 2008 which offers all of the distributed version control and source code management functionality of Git, as well as its own features which support communication and collaboration.

Every GitHub account offers support for as many public repositories as you care to host entirely for free, and for a single-digit subscription fee you can have as many private repositories as you like too !! Every project you create is supported by a collection of collaboration tools which includes access control, bug tracking, feature requests, task management and markdown-compatible wikis so you can provide documentation for your project. They provide a pastebin-style feature called Gist intended for sharing code snippets which includes a very handy embed feature so that you can easily include your snippet on your own blog or website.

If you're a professional coder, you've probably already realised that a healthy GitHub Account is an essential part of your portfolio - especially during those times when you're looking for your next contract or salaried position. Having recently been in exactly this position, I noticed that many IT Recruiters and Contract Agencies will actually ask for the address of your GitHub Account as part of their application / onboarding process - and I can understand why. From their point of view, a healthy GitHub Account gives them an opportunity to preview the quality of your work - and from your point of view it's a fantastic way to show off your skills and specialties.

Think of this too - we all have our favourite little code snippets that we know and love and might use in one form or another in several projects with severl different owners. Having those favourite snippets sitting in a GitHub Account with a datetime stamp on them leave absolutely no room for doubt when it comes to proving who owns THAT particular chunk of code (even if you have it in a private repo).