Git Zero to Git Hero

Mastering git requires a mentor. Let me be yours.

Git Zero to Git Hero

Mastering git requires a mentor. Let me be yours.


Getting started with git

If reading is your thing, be sure to check out these ‘git basics’ guides. All of them cover the same content, but with a slightly different angle.

Hello World
The Hello World project is a time-honored tradition in computer programming. It is a simple exercise that gets you…guides.github.com

Get Started with Git
Version control: It isn't just for coders anymore. If you're a writer, editor, or a designer who works iteratively on…alistapart.com

git - the simple guide
just a simple guide for getting started with git. no deep shit ;)rogerdudler.github.io

Git Basics Course
If you're serious about pursuing a career as a software developer or designer, at some point, you will need to learn a…teamtreehouse.com

Okay, so you’ve got the basics. The next question is, how do you improve your git technique and become a git master?

Write better commit messages

Your commit messages exist for you and your benefit, so you’re doing yourself a disservice to not be writing them in a way that will actually be useful to you in a year, six months, a week, a day or even an hour.

Go out and write yourself the best darn messages you can, all the time, with the help of this post from Tim Pope:

A Note About Git Commit Messages
I want to take a moment to elaborate on what makes a well formed commit message. I think the best practices for commit…tbaggery.com

Branches and branching strategy

A solid understanding of branching will make sure that your commit logs actually make sense historically, allows you to work with parallel versions of your source code and keep your master branch focussed, neat and tidy.

Our recommended branching ‘strategy’ is:

  • The master branch represents your stable release.
  • The development branch is for your work in progress.
  • Individual features should be developed in their own branch.
  • Features are branched from the development branch.
  • Completed features are merged into the development branch.
  • Stable development branches get merged into the master branch.

1 Scw6Tuap3aDVVldTePkFIw

To help solidify your knowledge about branches, have a play with this tool:

Learn Git Branching
A interactive Git visualization tool to educate and challenge!pcottle.github.io

Craft your commits

“A commit, like a well-designed function or class, should represent a single concept. A distinct, cohesive commit is easy to understand, review, and, if necessary, revert.”

The real world of development is a little messy, but your source code and your git commits don’t have to represent this, and you can perfect the contents of your commit as you make it, so that your commit meets these goals — distinct, cohesive and focussed.

Crafting Commits in Git
A commit, like a well-designed function or class, should represent a single concept. A distinct, cohesive commit is…blog.carbonfive.com

Git - Interactive Staging
Interactive Staging Git comes with a couple of scripts that make some command-line tasks easier. Here, you'll look at a…git-scm.com

Use an IDE, like SourceTree

Does branching get you down, and crafting commit messages seem a little overly complex? Learning the basics with the ‘good old console’ has its advantages, but you don’t have to suffer doing things the hard way all the time. Using a more advanced desktop application gives you a much easier way to visualise your code changes and craft your commits, without all the complexity of its command-line counterpart.

Free Mercurial and Git Client for Windows and Mac | Atlassian SourceTree
SourceTree is a free Mercurial and Git Client for Windows and Mac that provides a graphical interface for your Hg and…www.sourcetreeapp.com