Git magic


Git is a version control Swiss army knife. A reliable versatile multipurpose revision control tool whose extraordinary flexibility makes it tricky to learn, let alone master.

As Arthur C. Clarke observed, any sufficiently advanced technology is indistinguishable from magic. This is a great way to approach Git: newbies can ignore its inner workings and view Git as a gizmo that can amaze friends and infuriate enemies with its wondrous abilities.

Rather than go into details, we provide rough instructions for particular effects. After repeated use, gradually you will understand how each trick works, and how to tailor the recipes for your needs.


Total pages:
Author: Ben Lynn


  • Basic Tricks – use these elementary examples to get your feet wet
  • Cloning Around
  • Branch Wizardy – instant branching and merging
  • Lessons of History – like cloning, branching, and merging, rewriting history is simply another power Git gives you
  • Multiplayer Git – looks at remote branches, multiple remotes and more
  • Git Grandmastery – some recipes
  • Secrets Revealed – takes a peek under the hood and explains how Git performs its miracles: Invisibility, Integrity, Intelligence, Indexing, Git’s Origins, The Object Database, Blobs, Trees, Commits

Read/ Download

onlineDownload PDF


This guide is released under the GNU General Public License version 3. Naturally, the source is kept in a Git repository, and can be obtained by typing:

$ git clone git://  # Creates "gitmagic" directory.

Leave a Reply

Your email address will not be published. Required fields are marked *