Skip to content

Latest commit

 

History

History
123 lines (105 loc) · 5.09 KB

TALK.md

File metadata and controls

123 lines (105 loc) · 5.09 KB

git: the stupid version control system

requests

Prior Knowledge

Required

  • CLI experience (cd, ls, mv, rm)
  • The git binary (download or your favorite package manager)

Recommended

  • Experience with UNIX commands (grep, patch, diff, shasum)
  • Familiarity with at least one terminal-based editor (nano, vi, emacs)
  • Familiarity with config files

Part One: Basics

Just enough info to make this talk interactive.

Concepts

Commands

Part Two: Uses

Everyday uses for git. Should make you comfortable with branches and history.

Concepts

Commands

Third-Party Tools

Part Three: Tips and Tricks

In depth concepts and uses for git. For power users.

Concepts

  • specifying revisions
    • <rev>, one of
      • <commit>, a SHA1 sum
      • <describe>, any output of git describe
      • <refname>, one of
        • a branch/tag/remote name
        • *HEAD, any of the refs used internally by git, including stashes
      • <refname>@{<time>} gives the tree at latest point before that time
        (or the first commit, if the repo was made after that time)
        where <time> :: {yesterday|<ordinal number> <unit> [ago]|<date>}
        where <ordinal number> :: {1, 2, 3 ... | one, two, three ...}
        where <unit> :: {second|minute|hour|day|week|month|year}[s]
        where <date> :: {<isodate>[-<precise time>]}
        where <isodate> :: YYYY-MM-DD
        where <precise time> :: HH:MM:SS
        also, 'last' changes the output somehow and I have no idea why.
      • <refname>@{<number>} gives the <number> previous commit in that tree
      • @{<number>}, the <number> previous reflog checked out
      • @{-<number>}, which does something I can't figure out.
      • <branch>@{push|upstream} shows the latest known remote commit for <branch>
        this is the same as <default {upstream|push}>/<branch>.
        upstream differs from push IFF you have a triangular workflow
    • <rev>^<number>, the <number> parent of the commit
      (not the <number> previous commit; this is relevant for merge commits with multiple parents
    • <rev>~<number>, the <number> previous commit following first parents
      where <number> :: {1, 2, 3 ...}
  • triangular workflows (short explanation)
  • rebasing
  • fast-forwarding
  • resetting
  • octopus merges (see also)

Commands

Flags

  • --interactive
  • --patch: see git-apply and the original patch
  • --cached

Part Four: Plumbing and Pedantry

The lowest level of git. The commands are used internally by the porcelain.

Concepts

Commands