Training material for teaching Git
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
explanation
images
.gitignore
README.md
UNLICENSE
branches.md
commit.md
git_cheatsheet.md
head.md
index.md
init.md
pull.md
push.md
reflog.md
remotes.md
reset.md
shell-cheatsheet.md

README.md

Git Training

Does this look familiar?

xkcd

Sadly it's not that far from the truth for many users of Git, and doesn't always improve with more exposure.

One analogy could be made with the following comic.

In this case each blind man could represent a different Git command. By just running the commands, there are a number of cases where what you think Git is doing is not what it's actually doing.

In particular this often involves commands relating to branches, and pushing/pulling from a remote server.

This material is not intended to teach advanced Git (eg. run git magic --hard --all and you'll be more 100x more productive). The aim is to focus on a few critical aspects of Git that can often cause the most amount of confusion.

Prerequisites

Everything in this guide assumes some form of terminal/command-line with git installed.

For Windows this means Git for Windows, ideally in the msysgit terminal and not Windows Cmd. If you're not sure try running ls, cd or cat README.md, the examples make some use of these commands.

No GUIs.

Sections

  1. Getting started

Core

  1. Commits
  2. Master and HEAD
  3. Branches

Intermediate

  1. Remotes
  2. Pull
  3. Push

Advanced

Help

References