Getting started with Git and GitHub
Getting started with Git and GitHub
Join the DZone community and get the full member experience.Join For Free
Now that Subtext, the blogging engine I’m working (or at least I should) on together with Phil Haack, has been officially moved to GitHub (guess the reason why), I finally have a reason to really study git and github.
I already tried starting a few years ago, and even used it a bit lately to work on the ugialt.net conference site (here the conf-oo github repo), but never really studied in depth, and still didn’t fully get the key differences between a traditional source control and a distributed source control.
So I asked around and found some good pointers.
Think Like (a) Git
The most recommended pointer I got is the Think Like (a) Git website, a self-proclaimed “Guide for the perplexed”. It’s a pretty nice tutorial covering all the key concepts of Git.
ProGit book and site
The second most popular recommendation I got is the Pro Git book from Apress. The thing that differentiate it from other books is its widespread usage of visuals and samples.
The cool thing is that, while still being a paper book and having a Kindle version, both released on 2009, there is also a Creative Common licensed ebook (PDF, Mobi, ePub) and also available for online reading.
The “code” for the book and his images is available on github and is updated with fixes coming from readers.
Other Git books
But Pro Git is not the only book available. Other two interesting books are the Pragmatic Guide to Git, published by Pragmatic Programmers and Version Control with Git: Powerful Tools and Techniques for Collaborative Software Development, by O'Reilly.
Then come the cheat sheets: GitHub lists a few ones.
Contributing to Open Source Projects On GitHub For .NET Developers video series
UPDATE: suggested by Bobby Johnson in the comments, a series of 3 videos on how to use Git and GitHub for contributing to OSS projects:
- Installation & GitHub Account Creation & Setup
- Publishing a Visual Studio Project to GitHub & Basic Git Workflow
- Forking a Project, Keeping It Up To Date & Basic Contribution Strategy
The GitHub Flow
One thing is to know the commands and how to use them, another matter is using it with the right approach and workflow.
I found two nice blog posts that explain two different versioning/branching strategies:
- The usual workflow based on master + develop and feature branches, release branches, hot-fix branches, this time referred to as Git-Flow
- The workflow used by GitHub itself, which is kind of less formal in some ways (no tons of release-based branches) and more strict in other ways (never commit to master without a code review and a pull request).
One works great if you have a product with formal releases and have the time and resources to manage all that formal branches, the other works great in less formal environment, with continuous deployments, and no formal releases.
Some other useful links
- How to quickly get started with Git/GitHub – that was my original post from 2009, where I first collected some other useful (but probably outdated) links.
- Git Reference – Comprehensive Git reference site.
- Official Git documentation – The official documentation on the Git website.
- GitHub documentation – how to use GitHub
- A Visual Git Reference – nice reference with lots of visuals
- The Git Simple Guide – very simple step-by-step tutorial
Do you have any other resources to recommend?
This is what I found, and apparently what the most popular resources are. But I’d love if you could add your own findings by posting a comment.
Published at DZone with permission of Simone Chiaretta , DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.